mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend_chromium: fix use-after-free
It's a regression in commit bdfa812d79
.
This commit is contained in:
parent
44100f8852
commit
c9ccc4f6df
1 changed files with 4 additions and 4 deletions
|
@ -2238,6 +2238,10 @@ bookmark_delete (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove from store
|
||||||
|
json_t *siblings = parent_entry->children;
|
||||||
|
json_array_remove(siblings, json_array_search(siblings, entry->node));
|
||||||
|
|
||||||
// Remove from maps
|
// Remove from maps
|
||||||
long guidmap_entry_id = lctx.entry_id;
|
long guidmap_entry_id = lctx.entry_id;
|
||||||
if (!(ctx->flags & BACKEND_FILENAME_GUID)) {
|
if (!(ctx->flags & BACKEND_FILENAME_GUID)) {
|
||||||
|
@ -2248,10 +2252,6 @@ bookmark_delete (
|
||||||
hashmap_delete(ctx->id_map, entry, -1);
|
hashmap_delete(ctx->id_map, entry, -1);
|
||||||
free(entry);
|
free(entry);
|
||||||
|
|
||||||
// Remove from store
|
|
||||||
json_t *siblings = parent_entry->children;
|
|
||||||
json_array_remove(siblings, json_array_search(siblings, entry->node));
|
|
||||||
|
|
||||||
ctx->dirty = DIRTY_LEVEL_DATA;
|
ctx->dirty = DIRTY_LEVEL_DATA;
|
||||||
|
|
||||||
node_mtime_now(parent_entry->node, NULL);
|
node_mtime_now(parent_entry->node, NULL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue