aboutsummaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hash.c b/src/hash.c
index ce91ceb..1cfd704 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -371,6 +371,14 @@ void hash_del_internal_node(void *ptr, const struct hash_export_node *node)
struct hash_map *map = ptr;
CHECK_SENTINEL(map);
+ struct hash_node *node_val = node->node;
+
+ if(map->free_data)
+ map->free_data((void*)node_val->data);
+ if(map->free_key)
+ map->free_key((void*)node_val->key);
+ free(node_val);
+
if(node->last)
((struct hash_node*)node->last)->next = node->next;
else