[vlc-commits] visual: fix memory leak

Zhao Zhili git at videolan.org
Sat May 5 14:29:21 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Sat Apr 28 11:19:28 2018 +0800| [666e7d21579f15b6552314d6ecdf0b202952c9ed] | committer: Jean-Baptiste Kempf

visual: fix memory leak

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 1b3df6d36e..4bd43ec2e4 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 "



More information about the vlc-commits mailing list