forked from enlightenment/efl
eina_hash: Move hash_free_cb to avoid memory leak.
Call hash_free_cb after finish deletion. ref T8530 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10918
This commit is contained in:
parent
3a385ccae0
commit
a2084ba22e
|
@ -410,7 +410,6 @@ _eina_hash_del_by_hash_el(Eina_Hash *hash,
|
|||
hash_element), EINA_RBTREE_CMP_NODE_CB(
|
||||
_eina_hash_key_rbtree_cmp_node),
|
||||
(const void *)hash->key_cmp_cb);
|
||||
_eina_hash_el_free(hash_element, hash);
|
||||
|
||||
if (!hash_head->head)
|
||||
{
|
||||
|
@ -431,6 +430,8 @@ _eina_hash_del_by_hash_el(Eina_Hash *hash,
|
|||
hash->buckets = NULL;
|
||||
}
|
||||
|
||||
_eina_hash_el_free(hash_element, hash);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue