mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-05-06 15:47:55 +02:00
Properly handle deleting everything out of a hash table.
This commit is contained in:
@@ -753,11 +753,15 @@ void DestroyVars(int all)
|
||||
next = hash_table_next(&VHashTbl, v);
|
||||
if (all || !v->preserve) {
|
||||
DestroyValue(v->v);
|
||||
hash_table_delete(&VHashTbl, v);
|
||||
hash_table_delete_no_resize(&VHashTbl, v);
|
||||
free(v);
|
||||
}
|
||||
v = next;
|
||||
}
|
||||
if (all) {
|
||||
hash_table_free(&VHashTbl);
|
||||
InitVars();
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user