aboutsummaryrefslogtreecommitdiff
path: root/src/hashtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashtable.h')
-rw-r--r--src/hashtable.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hashtable.h b/src/hashtable.h
index 42d0166..f593432 100644
--- a/src/hashtable.h
+++ b/src/hashtable.h
@@ -76,7 +76,10 @@ void table_free(struct table *table)
bucket = next;
}
}
- free(table->buckets);
+ if (table->buckets) {
+ free(table->buckets);
+ table->buckets = NULL;
+ }
}
void *table_find(struct table *table, void *key)