bugfix: actually use the argument to strmap_free()

svn:r3640
This commit is contained in:
Roger Dingledine 2005-02-20 23:12:20 +00:00
parent 38f53cff41
commit b5bddd8cfd

View File

@ -622,7 +622,7 @@ strmap_free(strmap_t *map, void (*free_val)(void*))
SPLAY_REMOVE(strmap_tree, &map->head, ent); SPLAY_REMOVE(strmap_tree, &map->head, ent);
tor_free(ent->key); tor_free(ent->key);
if (free_val) if (free_val)
tor_free(ent->val); free_val(ent->val);
} }
tor_assert(SPLAY_EMPTY(&map->head)); tor_assert(SPLAY_EMPTY(&map->head));
tor_free(map); tor_free(map);