1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-26 03:47:52 +02:00

gbookmarkfile: Fix a minor leak on an error path

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2019-11-05 10:08:45 +00:00
parent 3689fd9f8d
commit 4332e3b160

@@ -775,13 +775,22 @@ parse_bookmark_element (GMarkupParseContext *context,
item = bookmark_item_new (uri); item = bookmark_item_new (uri);
if (added != NULL && !timestamp_from_iso8601 (added, &item->added, error)) if (added != NULL && !timestamp_from_iso8601 (added, &item->added, error))
{
bookmark_item_free (item);
return; return;
}
if (modified != NULL && !timestamp_from_iso8601 (modified, &item->modified, error)) if (modified != NULL && !timestamp_from_iso8601 (modified, &item->modified, error))
{
bookmark_item_free (item);
return; return;
}
if (visited != NULL && !timestamp_from_iso8601 (visited, &item->visited, error)) if (visited != NULL && !timestamp_from_iso8601 (visited, &item->visited, error))
{
bookmark_item_free (item);
return; return;
}
add_error = NULL; add_error = NULL;
g_bookmark_file_add_item (parse_data->bookmark_file, g_bookmark_file_add_item (parse_data->bookmark_file,