summaryrefslogtreecommitdiff
path: root/src/hashmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashmap.c')
-rw-r--r--src/hashmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hashmap.c b/src/hashmap.c
index 6b6e909ba3..51f00131f4 100644
--- a/src/hashmap.c
+++ b/src/hashmap.c
@@ -173,6 +173,15 @@ void hashmap_free(Hashmap*h) {
free(h);
}
+void hashmap_free_free(Hashmap *h) {
+ void *p;
+
+ while ((p = hashmap_steal_first(h)))
+ free(p);
+
+ hashmap_free(h);
+}
+
void hashmap_clear(Hashmap *h) {
if (!h)
return;