aboutsummaryrefslogtreecommitdiff
path: root/analyzer/structures/hashmap.c
diff options
context:
space:
mode:
authorMosder <xmosder12@gmail.com>2026-07-14 13:20:41 +0200
committerMosder <xmosder12@gmail.com>2026-07-14 13:20:41 +0200
commit4dbef658e31e0520d77f90df2bb3e66c21ce2ea4 (patch)
treec7826d7af604444aba10f41cb0a46115d9a7ac1f /analyzer/structures/hashmap.c
parent2ab15f565d042c1bd460ac4c14c70368ef197cd5 (diff)
fix: added guard for NULLs in free_heap and free_hashmap
Diffstat (limited to 'analyzer/structures/hashmap.c')
-rw-r--r--analyzer/structures/hashmap.c2
1 files changed, 2 insertions, 0 deletions
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) {