free then clear hash tables

This commit is contained in:
Kovid Goyal 2021-12-04 13:57:25 +05:30
parent 14047588ae
commit 799881af2d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -94,9 +94,9 @@ void
free_window_logo_table(WindowLogoTable **table) {
WindowLogoItem *current, *tmp;
HASH_ITER(hh_id, (*table)->by_id, current, tmp) {
HASH_DELETE(hh_id, (*table)->by_id, current);
free_window_logo(*table, &current);
}
HASH_CLEAR(hh_path, (*table)->by_path);
HASH_CLEAR(hh_id, (*table)->by_id);
free(*table); *table = NULL;
}