[vlc-commits] dxva2: Fix memory leak on error
Hugo Beauzée-Luyssen
git at videolan.org
Thu Aug 9 10:23:12 CEST 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Aug 9 09:58:23 2018 +0200| [b183bec33ccfe8e0a6436783b0453cf432d6b90e] | committer: Hugo Beauzée-Luyssen
dxva2: Fix memory leak on error
(cherry picked from commit 0fd8cdabe9d584bbc4f46e819af68ea0d7dbd315)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b183bec33ccfe8e0a6436783b0453cf432d6b90e
---
modules/codec/avcodec/dxva2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 7c65b4b227..ab4cdd9b85 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -514,7 +514,9 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *
if (!directx_va_canUseDecoder(va, identifier.VendorId, identifier.DeviceId,
input, driverBuild))
{
- msg_Warn(va, "GPU blacklisted for %s codec", directx_va_GetDecoderName(input));
+ char* psz_decoder_name = directx_va_GetDecoderName(input);
+ msg_Warn(va, "GPU blacklisted for %s codec", psz_decoder_name);
+ free(psz_decoder_name);
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list