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

xml! fix potential memleak.

parent d479ed1b
......@@ -149,16 +149,19 @@ static int ReaderOpen( vlc_object_t *p_this )
xml_reader_sys_t *p_sys = malloc( sizeof( *p_sys ) );
xmlTextReaderPtr p_libxml_reader;
if( unlikely(!p_sys) )
return VLC_ENOMEM;
if( !xmlHasFeature( XML_WITH_THREAD ) )
{
free( p_sys );
return VLC_EGENERIC;
}
vlc_mutex_lock( &lock );
xmlInitParser();
vlc_mutex_unlock( &lock );
if( unlikely(!p_sys) )
return VLC_ENOMEM;
p_libxml_reader = xmlReaderForIO( StreamRead, NULL, p_reader->p_stream,
NULL, NULL, 0 );
if( !p_libxml_reader )
......
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