ee
This commit is contained in:
@@ -101,7 +101,7 @@ void hash_map_free(struct hash_map *hash_map)
|
||||
}
|
||||
free(hash_map->data);
|
||||
free(hash_map);
|
||||
hash_map->data = NULL;
|
||||
//hash_map->data = NULL;
|
||||
}
|
||||
|
||||
void hash_map_dump(struct hash_map *hash_map)
|
||||
@@ -160,8 +160,9 @@ bool hash_map_remove(struct hash_map *hash_map, const char *key)
|
||||
prev->next = elt->next;
|
||||
else
|
||||
hash_map->data[hashed_val] = elt->next;
|
||||
free(elt);
|
||||
//free(elt);
|
||||
printf("removed %s", elt->value);
|
||||
free(elt);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user