From 196a30821dd1d3459807ed7ad1f45ceda1fa5585 Mon Sep 17 00:00:00 2001 From: Mosder Date: Wed, 22 Jul 2026 01:34:42 +0200 Subject: fix: fixed wrong arguments in cleanup functions of hashmap --- analyzer/structures/hashmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/analyzer/structures/hashmap.c b/analyzer/structures/hashmap.c index 7a38852..84cc289 100644 --- a/analyzer/structures/hashmap.c +++ b/analyzer/structures/hashmap.c @@ -33,7 +33,7 @@ void hashmap_put(HashMap *map, void *key, void *value) { if (map->compare(key, node->key)) { // ensure no hanging memory allocation if (map->value_cleanup) { - map->value_cleanup(node); + map->value_cleanup(node->value); } memcpy(node->value, value, map->value_size); return; @@ -72,10 +72,10 @@ void *hashmap_get(HashMap *map, void *key) { void free_node_without_next(HashMap *map, HashMapNode *node) { if (map->key_cleanup) { - map->key_cleanup(node); + map->key_cleanup(node->key); } if (map->value_cleanup) { - map->value_cleanup(node); + map->value_cleanup(node->value); } free(node->key); free(node->value); -- cgit v1.2.3