Commit b751665a authored by Rémi Duraffort's avatar Rémi Duraffort

svg module: fix memleak.

parent 1172bcd3
...@@ -202,6 +202,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this ) ...@@ -202,6 +202,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
if( !psz_template ) if( !psz_template )
{ {
fclose( file ); fclose( file );
free( psz_filename );
return NULL; return NULL;
} }
memset( psz_template, 0, s.st_size + 1 ); memset( psz_template, 0, s.st_size + 1 );
...@@ -210,6 +211,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this ) ...@@ -210,6 +211,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
fclose( file ); fclose( file );
} }
} }
free( psz_filename );
if( !psz_template ) if( !psz_template )
{ {
/* Either there was no file, or there was an error. /* Either there was no file, or there was an error.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment