Commit df3e9f11 authored by Dennis van Amerongen's avatar Dennis van Amerongen

* modules/misc/svg.c: Backport [20353], Fix memleak

parent 34894772
...@@ -137,6 +137,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -137,6 +137,7 @@ static int Create( vlc_object_t *p_this )
if( !p_sys->psz_template ) if( !p_sys->psz_template )
{ {
msg_Err( p_filter, "out of memory" ); msg_Err( p_filter, "out of memory" );
free( p_sys );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
...@@ -160,7 +161,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this ) ...@@ -160,7 +161,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
FILE *file; FILE *file;
psz_filename = config_GetPsz( p_filter, "svg-template-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. */ /* No filename. Use a default value. */
psz_template = NULL; psz_template = NULL;
......
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