[vlc-devel] [PATCH 2/2] visual: fix memory leak

Zhao Zhili quinkblack at foxmail.com
Sat Apr 28 05:19:28 CEST 2018


---
 modules/visualization/visual/window.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/visualization/visual/window.c b/modules/visualization/visual/window.c
index 1b3df6d..4bd43ec 100644
--- a/modules/visualization/visual/window.c
+++ b/modules/visualization/visual/window.c
@@ -91,10 +91,12 @@ void window_get_param( vlc_object_t * p_aout, window_param * p_param )
     {
         if( !strcasecmp( psz_preset, window_list[i] ) )
         {
+            free( psz_preset );
             p_param->wind_type = i;
             return;
         }
     }
+    free( psz_preset );
 
 no_preset:
     msg_Warn( p_aout, "No matching window preset found; using rectangular "
-- 
2.9.5



More information about the vlc-devel mailing list