discomfitor pushed a commit to branch master.

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

commit fd4226eb8f51d440616e0bffad4ec43521c62815
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Jun 15 13:35:34 2015 -0400

    use a safe iterator when deleting clients during comp shutdown
    
    it's conceivable that, were there a bug in client refcounting,
    this could become an infinite loop and prevent shutdown/restart.
    since, at this point, we don't really care about deleting anything,
    ensure that the loop will end
---
 src/bin/e_comp.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 8290fb6..985424b 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1290,14 +1290,17 @@ e_comp_internal_save(void)
 EINTERN int
 e_comp_shutdown(void)
 {
+   Eina_List *l, *ll;
+   E_Client *ec;
+
 #ifdef HAVE_WAYLAND
    E_Pixmap_Type type = e_comp->comp_type;
 #endif
    E_FREE_FUNC(action_timeout, ecore_timer_del);
-   while (e_comp->clients)
+   EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec)
      {
-        DELD(eina_list_data_get(e_comp->clients), 99999);
-        e_object_del(eina_list_data_get(e_comp->clients));
+        DELD(ec, 99999);
+        e_object_del(E_OBJECT(ec));
      }
    e_object_del(E_OBJECT(e_comp));
    E_FREE_LIST(handlers, ecore_event_handler_del);

-- 


Reply via email to