[xhash] fix a bug in xh_destroy
This commit is contained in:
parent
947ddc45c8
commit
43e1d5b3df
|
@ -93,8 +93,8 @@ xh_destory(struct xhash *x)
|
||||||
for (i = 0; i < x->size; ++i) {
|
for (i = 0; i < x->size; ++i) {
|
||||||
e = x->buckets[i];
|
e = x->buckets[i];
|
||||||
while (e) {
|
while (e) {
|
||||||
e = e->next;
|
|
||||||
free((void*)e->key);
|
free((void*)e->key);
|
||||||
|
e = e->next;
|
||||||
free(e);
|
free(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue