Properly handle deleting everything out of a hash table.

This commit is contained in:
Dianne Skoll
2024-12-09 13:59:41 -05:00
parent fd2a61928c
commit 4a2d707654
9 changed files with 200055 additions and 13 deletions
+5 -1
View File
@@ -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();
}
}
/***************************************************************/