tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a52751d0653cefb1b4d2e3e816d56afe2f0cf166

commit a52751d0653cefb1b4d2e3e816d56afe2f0cf166
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Nov 8 12:10:50 2013 +0000

    Eo: Fixed potential infinite loop with child deletion.
    
    It looks like it should get into a loop for every object that has
    children.
---
 src/lib/eo/eo_base_class.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 5d1e6d1..95ca1b5 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -891,11 +891,12 @@ static void
 _destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
 {
    Private_Data *pd = class_data;
+   Eo *child;
 
    DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS));
 
-   while (pd->children)
-     eo_do(eina_list_data_get(pd->children), eo_parent_set(NULL));
+   EINA_LIST_FREE(pd->children, child)
+      eo_do(child, eo_parent_set(NULL));
 
    _eo_generic_data_del_all(class_data);
    _wref_destruct(class_data);

-- 


Reply via email to