]> git.sesse.net Git - vlc/commitdiff
Fix memleak.
authorJean-Paul Saman <jpsaman@videolan.org>
Wed, 30 May 2007 13:26:57 +0000 (13:26 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Wed, 30 May 2007 13:26:57 +0000 (13:26 +0000)
modules/misc/svg.c

index c68941b12cd1999af3d7045385474d1c1fe234b7..3482c2d0d8f9db68511bdd8b808d1b9a0d586acb 100644 (file)
@@ -138,6 +138,7 @@ static int Create( vlc_object_t *p_this )
     if( !p_sys->psz_template )
     {
         msg_Err( p_filter, "out of memory" );
+        free( p_sys );
         return VLC_ENOMEM;
     }
 
@@ -162,7 +163,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
     FILE *file;
 
     psz_filename = config_GetPsz( p_filter, "svg-template-file" );
-    if( !psz_filename || psz_filename[0] == 0 )
+    if( !psz_filename || (psz_filename[0] == 0) )
     {
         /* No filename. Use a default value. */
         psz_template = NULL;