Merge branch 'ossfuzz-9723-bookmark-leak' into 'master'

gbookmarkfile: Fix some more minor leaks when metadata elements are repeated

See merge request GNOME/glib!230
This commit is contained in:
Emmanuele Bassi 2018-08-06 12:54:04 +00:00
commit eb65054aba
3 changed files with 4 additions and 1 deletions

View File

@ -863,7 +863,8 @@ parse_application_element (GMarkupParseContext *context,
item->metadata->applications = g_list_prepend (item->metadata->applications, ai);
g_hash_table_replace (item->metadata->apps_by_name, ai->name, ai);
}
g_free (ai->exec);
ai->exec = g_strdup (exec);
if (count)

View File

@ -165,6 +165,7 @@ dist_test_data += \
bookmarks/fail-37.xbel \
bookmarks/fail-38.xbel \
bookmarks/fail-39.xbel \
bookmarks/fail-40.xbel \
bookmarks/valid-01.xbel \
bookmarks/valid-02.xbel \
bookmarks/valid-03.xbel \

View File

@ -0,0 +1 @@
<xbel version="1.0"><bookmark href=""><info><metadata owner="http://freedesktop.org"><applications><application name=""exec=""/><application name=""exec=""/