From 0e2924f6a72ecbd76ab72ca9005d8bea3834c38a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 5 Jul 2012 09:36:07 +0000 Subject: [PATCH] someone change... bdilly 72499. bad! iterators are not safe for deletions of hashes if u iterate over what u are deleting! SVN revision: 73335 --- legacy/elementary/src/lib/elm_module.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/legacy/elementary/src/lib/elm_module.c b/legacy/elementary/src/lib/elm_module.c index 8357cadc7d..757cfd18de 100644 --- a/legacy/elementary/src/lib/elm_module.c +++ b/legacy/elementary/src/lib/elm_module.c @@ -47,12 +47,15 @@ _elm_module_shutdown(void) if (modules) { + Eina_List *tl = NULL; + it = eina_hash_iterator_data_new(modules); - EINA_ITERATOR_FOREACH(it, m) - _elm_module_del(m); - + EINA_ITERATOR_FOREACH(it, m) tl = eina_list_append(tl, m); eina_iterator_free(it); + + EINA_LIST_FREE(tl, m) _elm_module_del(m); + eina_hash_free(modules); modules = NULL; }