If we set the data free callback of a hash, we expect it to be called when
authorcedric <cedric>
Thu, 11 Dec 2008 13:47:58 +0000 (13:47 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 11 Dec 2008 13:47:58 +0000 (13:47 +0000)
calling all eina_hash_del functions.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@38102 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_hash.c

index 9a09913..cc4e49d 100644 (file)
@@ -353,7 +353,7 @@ static Eina_Bool
 _eina_hash_del_by_hash_el(Eina_Hash *hash, Eina_Hash_El *el, Eina_Hash_Head *eh, int key_hash)
 {
    eh->head = eina_rbtree_inline_remove(eh->head, EINA_RBTREE_GET(el), EINA_RBTREE_CMP_NODE_CB(_eina_hash_key_rbtree_cmp_node), hash->key_cmp_cb);
-   if (el->begin == EINA_FALSE) free(el);
+   _eina_hash_el_free(el, hash);
 
    if (!eh->head)
      {