mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
ensure url database destructor cleans up correctly
This commit is contained in:
parent
6a26755576
commit
9176d3233f
@ -2480,8 +2480,10 @@ void urldb_destroy(void)
|
|||||||
|
|
||||||
/* Clean up search trees */
|
/* Clean up search trees */
|
||||||
for (i = 0; i < NUM_SEARCH_TREES; i++) {
|
for (i = 0; i < NUM_SEARCH_TREES; i++) {
|
||||||
if (search_trees[i] != &empty)
|
if (search_trees[i] != &empty) {
|
||||||
urldb_destroy_search_tree(search_trees[i]);
|
urldb_destroy_search_tree(search_trees[i]);
|
||||||
|
search_trees[i] = ∅
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* And database */
|
/* And database */
|
||||||
@ -2489,10 +2491,13 @@ void urldb_destroy(void)
|
|||||||
b = a->next;
|
b = a->next;
|
||||||
urldb_destroy_host_tree(a);
|
urldb_destroy_host_tree(a);
|
||||||
}
|
}
|
||||||
|
memset(&db_root, 0, sizeof(db_root));
|
||||||
|
|
||||||
/* And the bloom filter */
|
/* And the bloom filter */
|
||||||
if (url_bloom != NULL)
|
if (url_bloom != NULL) {
|
||||||
bloom_destroy(url_bloom);
|
bloom_destroy(url_bloom);
|
||||||
|
url_bloom = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user