frontends/va: Fix memory leak of decrypt_key
authorFeng Jiang <jiangfeng@kylinos.cn>
Wed, 24 May 2023 07:33:07 +0000 (15:33 +0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 10 Jul 2023 21:31:52 +0000 (21:31 +0000)
commit9790350e9dd9450786c2449c445fff5177bf230b
treed0ebe501018147fde3fa9f72377eaf391c9b826c
parent55d9ffc99ed03c903e2e33283384b3722d54023b
frontends/va: Fix memory leak of decrypt_key

pipe_picture_desc.decrypt_key was alloced in function
handleVAProtectedSliceDataBufferType(), but nowhere to
free it. Now, it will be freed as the vlVaContext is
destroyed.

Fixes: deb7dc82f62 ("frontends/va: handle protected slice data buffer")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23202>
src/gallium/frontends/va/context.c
src/gallium/frontends/va/picture.c