]> git.sesse.net Git - vlc/commitdiff
svg module: fix memleak.
authorRémi Duraffort <ivoire@videolan.org>
Fri, 1 Aug 2008 13:48:51 +0000 (15:48 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 1 Aug 2008 13:48:51 +0000 (15:48 +0200)
modules/misc/svg.c

index e059ea3f7ac4f14f5306dd9b196bba5bc62e28a6..d601cd7ca4e1b35694b9b71c6dd190087950cef8 100644 (file)
@@ -202,6 +202,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
                 if( !psz_template )
                 {
                     fclose( file );
+                    free( psz_filename );
                     return NULL;
                 }
                 memset( psz_template, 0, s.st_size + 1 );
@@ -210,6 +211,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
             fclose( file );
         }
     }
+    free( psz_filename );
     if( !psz_template )
     {
         /* Either there was no file, or there was an error.