Commit 3f849571 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ttml: Fix leak on error

fix CID #1346970 & #1346968
parent 8908961a
......@@ -239,8 +239,12 @@ static int ReadTTML( demux_t* p_demux )
{
psz_text = Append( psz_text, " %s = \"%s\"", psz_attr_name, psz_attr_value );
if ( unlikely( psz_text == NULL ) )
{
free( psz_begin );
free( psz_end );
return VLC_ENOMEM;
}
}
psz_attr_name = xml_ReaderNextAttr( p_sys->p_reader, &psz_attr_value );
}
psz_text = Append( psz_text, ">" );
......
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