[vlc-devel] commit: Fix memleak. ( Rémi Duraffort )

git version control git at videolan.org
Mon Aug 4 20:37:38 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Aug  4 20:38:43 2008 +0200| [60564df62d7bcfa266772e887edb30d365ec7026] | committer: Rémi Duraffort 

Fix memleak.

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

 modules/visualization/visual/visual.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c
index e2f2974..2f1351a 100644
--- a/modules/visualization/visual/visual.c
+++ b/modules/visualization/visual/visual.c
@@ -401,23 +401,14 @@ static void Close( vlc_object_t *p_this )
     for( i = 0; i < p_sys->i_effect; i++ )
     {
 #define p_effect p_sys->effect[i]
-        if( p_effect->psz_name )
-        {
-            free( p_effect->psz_name );
-        }
-        if( p_effect->psz_args )
-        {
-            free( p_effect->psz_args );
-        }
+        free( p_effect->p_data );
+        free( p_effect->psz_name );
+        free( p_effect->psz_args );
         free( p_effect );
 #undef p_effect
     }
 
-    if( p_sys->effect )
-    {
-        free( p_sys->effect );
-    }
-
+    free( p_sys->effect );
     free( p_filter->p_sys );
 }
 




More information about the vlc-devel mailing list