mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gbookmarkfile: Fix a minor leak on an error path
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user