Commit 912035aa authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential memleak.

parent c741c175
...@@ -1862,9 +1862,9 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader, ...@@ -1862,9 +1862,9 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
i_font_alpha = strtol( psz_value + 1, NULL, 16 ); i_font_alpha = strtol( psz_value + 1, NULL, 16 );
i_font_alpha &= 0xff; i_font_alpha &= 0xff;
} }
free( psz_name );
free( psz_value );
} }
free( psz_name );
free( psz_value );
} }
rv = PushFont( p_fonts, rv = PushFont( p_fonts,
psz_fontname, psz_fontname,
......
...@@ -663,9 +663,9 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader, ...@@ -663,9 +663,9 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
i_font_alpha = strtol( psz_value + 1, NULL, 16 ); i_font_alpha = strtol( psz_value + 1, NULL, 16 );
i_font_alpha &= 0xff; i_font_alpha &= 0xff;
} }
free( psz_name );
free( psz_value );
} }
free( psz_name );
free( psz_value );
} }
rv = PushFont( p_fonts, rv = PushFont( p_fonts,
psz_fontname, psz_fontname,
...@@ -736,7 +736,6 @@ static int ProcessNodes( filter_t *p_filter, ...@@ -736,7 +736,6 @@ static int ProcessNodes( filter_t *p_filter,
break; break;
case XML_READER_ENDELEM: case XML_READER_ENDELEM:
psz_node = xml_ReaderName( p_xml_reader ); psz_node = xml_ReaderName( p_xml_reader );
if( psz_node ) if( psz_node )
{ {
if( !strcasecmp( "font", psz_node ) ) if( !strcasecmp( "font", psz_node ) )
......
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