summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-24 18:06:39 +0100
committerPhil Sutter <phil@nwl.cc>2022-03-28 12:19:44 +0200
commit9be65154696859d94dcdeb7347ba5cca3b8d48ba (patch)
tree4ca33bfa15a326d7ab162c4161c508a903e1dcfb
parentdc454a657f57a5cf143fddc5c1dd87a510c1790a (diff)
hash: Flush tables when destroying
This is cosmetics only, but stops valgrind from complaining about definitely lost memory. Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--src/hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hash.c b/src/hash.c
index fe6a047..a0f240c 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -55,6 +55,7 @@ hashtable_create(int hashsize, int limit,
void hashtable_destroy(struct hashtable *h)
{
+ hashtable_flush(h);
free(h);
}