1
0
forked from bip/bip

Fix stuuuuuupid leak in hash_clean.

This commit is contained in:
Arnaud Cornet 2007-12-29 18:15:03 +01:00
parent b020e895a8
commit 95618a06ab

View File

@ -463,9 +463,13 @@ void hash_init(hash_t *h, int options)
void hash_clean(hash_t *h) void hash_clean(hash_t *h)
{ {
int i; int i;
hash_item_t *hi;
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
while (list_remove_first(&h->lists[i])) while ((hi = list_remove_first(&h->lists[i]))) {
; free(hi->key);
free(hi);
}
} }
} }