diff options
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13,7 +13,7 @@ static struct hashmap *all_terms; static void hashmap_free_term(void *item) { struct term *term = *(struct term **)item; - free(term); + term_destroy_head(term); } struct hashmap *map_all_terms(void) @@ -31,7 +31,7 @@ struct term *map_get(struct hashmap *map, hash_t hash) void map_set(struct hashmap *map, struct term *term) { - if (!hashmap_get(map, term->hash)) + if (map == all_terms && !hashmap_get(map, term->hash)) schedule_add(term); // also add to schedule hashmap_set(map, &term, term->hash); } |