mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
gbookmarkfile: Fix some more minor leaks when metadata elements are repeated
oss-fuzz#9723 Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
0fba231a6b
commit
2860d4b50e
@ -863,7 +863,8 @@ parse_application_element (GMarkupParseContext *context,
|
|||||||
item->metadata->applications = g_list_prepend (item->metadata->applications, ai);
|
item->metadata->applications = g_list_prepend (item->metadata->applications, ai);
|
||||||
g_hash_table_replace (item->metadata->apps_by_name, ai->name, ai);
|
g_hash_table_replace (item->metadata->apps_by_name, ai->name, ai);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (ai->exec);
|
||||||
ai->exec = g_strdup (exec);
|
ai->exec = g_strdup (exec);
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
|
@ -165,6 +165,7 @@ dist_test_data += \
|
|||||||
bookmarks/fail-37.xbel \
|
bookmarks/fail-37.xbel \
|
||||||
bookmarks/fail-38.xbel \
|
bookmarks/fail-38.xbel \
|
||||||
bookmarks/fail-39.xbel \
|
bookmarks/fail-39.xbel \
|
||||||
|
bookmarks/fail-40.xbel \
|
||||||
bookmarks/valid-01.xbel \
|
bookmarks/valid-01.xbel \
|
||||||
bookmarks/valid-02.xbel \
|
bookmarks/valid-02.xbel \
|
||||||
bookmarks/valid-03.xbel \
|
bookmarks/valid-03.xbel \
|
||||||
|
1
glib/tests/bookmarks/fail-40.xbel
Normal file
1
glib/tests/bookmarks/fail-40.xbel
Normal file
@ -0,0 +1 @@
|
|||||||
|
<xbel version="1.0"><bookmark href=""><info><metadata owner="http://freedesktop.org"><applications><application name=""exec=""/><application name=""exec=""/
|
Loading…
x
Reference in New Issue
Block a user