Commit eaa5b320 authored by Francois Cartegnie's avatar Francois Cartegnie

addons: handle unclosed addon tags

cid #1170827
cid #1170828
parent ad5dda25
......@@ -690,6 +690,9 @@ static int LoadCatalog( addons_finder_t *p_finder )
{
if ( ! strcmp( p_node, "addon" ) )
{
if ( p_entry ) /* ?!? Unclosed tag */
addon_entry_Release( p_entry );
p_entry = addon_entry_New();
//p_entry->psz_source_module = strdup( ADDONS_MODULE_SHORTCUT );
p_entry->e_flags = ADDON_MANAGEABLE;
......@@ -796,6 +799,8 @@ static int LoadCatalog( addons_finder_t *p_finder )
}
end:
if ( p_entry ) /* ?!? Unclosed tag */
addon_entry_Release( p_entry );
xml_ReaderDelete( p_xml_reader );
stream_Delete( p_stream );
return i_ret;
......
......@@ -228,6 +228,8 @@ static int ParseCategoriesInfo( addons_finder_t *p_finder, stream_t *p_stream )
{
if ( ! strcmp( p_node, "addon" ) )
{
if ( p_entry ) /* Unclosed tag */
addon_entry_Release( p_entry );
p_entry = addon_entry_New();
p_entry->psz_source_module = strdup( ADDONS_MODULE_SHORTCUT );
p_entry->e_flags = ADDON_MANAGEABLE;
......@@ -303,6 +305,8 @@ static int ParseCategoriesInfo( addons_finder_t *p_finder, stream_t *p_stream )
}
end:
if ( p_entry ) /* Unclosed tag */
addon_entry_Release( p_entry );
xml_ReaderDelete( p_xml_reader );
return i_num_entries_created;
}
......
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