Do not free elements twice
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 4 Feb 2010 14:47:52 +0000 (14:47 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 4 Feb 2010 14:47:52 +0000 (14:47 +0000)
eina_hash_del_by_key() already calls _e_connman_element_unregister_internal().
Calling it again will add another core event that will try to unref the element more than
it was referenced, so element's refcounter is going to < 0.

Bug is visible if e_connman_element_unregister() is called inside e_dbus.

By: Lucas De Marchi <lucas.demarchi@profusion.mobi>

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@45870 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/connman/e_connman_element.c

index 8bbac55..fb330c8 100644 (file)
@@ -2095,8 +2095,6 @@ e_connman_element_unregister(E_Connman_Element *element)
 
    if (elements)
      eina_hash_del_by_key(elements, element->path);
-
-   _e_connman_element_unregister_internal(element);
 }
 
 /**