don't leak

SVN revision: 38806
This commit is contained in:
rephorm 2009-01-27 05:11:16 +00:00 committed by rephorm
parent e5123aac83
commit 0f053605b9
1 changed files with 5 additions and 2 deletions

View File

@ -833,8 +833,11 @@ eina_hash_free(Eina_Hash *hash)
EINA_SAFETY_ON_NULL_RETURN(hash); EINA_SAFETY_ON_NULL_RETURN(hash);
if (hash->buckets) if (hash->buckets)
for (i = 0; i < hash->size; i++) {
eina_rbtree_delete(hash->buckets[i], EINA_RBTREE_FREE_CB(_eina_hash_head_free), hash); for (i = 0; i < hash->size; i++)
eina_rbtree_delete(hash->buckets[i], EINA_RBTREE_FREE_CB(_eina_hash_head_free), hash);
free(hash->buckets);
}
free(hash); free(hash);
} }