[vlc-commits] directx_va: Fix leak

Hugo Beauzée-Luyssen git at videolan.org
Tue Mar 20 14:53:06 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 20 14:28:01 2018 +0100| [f7b42ed697816cafb0f5ea69a8b359e8b9e155a0] | committer: Hugo Beauzée-Luyssen

directx_va: Fix leak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f7b42ed697816cafb0f5ea69a8b359e8b9e155a0
---

 modules/codec/avcodec/directx_va.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index a6bcac3537..0c62644581 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -424,8 +424,12 @@ static int FindVideoServiceConversion(vlc_va_t *va, directx_sys_t *dx_sys,
         {
             is_supported = profile_supported( mode, fmt, avctx );
             if (!is_supported)
+            {
+                char *psz_name = directx_va_GetDecoderName(mode->guid);
                 msg_Warn( va, "Unsupported profile %d for %s ",
-                          fmt->i_profile, directx_va_GetDecoderName(mode->guid) );
+                          fmt->i_profile, psz_name );
+                free( psz_name );
+            }
         }
         if (!is_supported)
             continue;



More information about the vlc-commits mailing list