From 4dbef658e31e0520d77f90df2bb3e66c21ce2ea4 Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 14 Jul 2026 13:20:41 +0200 Subject: fix: added guard for NULLs in free_heap and free_hashmap --- analyzer/structures/hashmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'analyzer/structures/hashmap.c') diff --git a/analyzer/structures/hashmap.c b/analyzer/structures/hashmap.c index ed2eb4b..7a38852 100644 --- a/analyzer/structures/hashmap.c +++ b/analyzer/structures/hashmap.c @@ -100,6 +100,8 @@ void hashmap_delete(HashMap *map, void *key) { } void hashmap_free(HashMap *map) { + if (!map) + return; for (size_t i = 0; i < HASHMAP_TABLE_SIZE; i++) { HashMapNode *curr = map->table[i]; while (curr) { -- cgit v1.2.3