From acfe42b0b66fb8f1aedfb9b6298a2e750ac988de Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Tue, 20 Apr 2010 19:00:05 +0000 Subject: [PATCH] 'everything' fix bug SVN revision: 48172 --- src/modules/everything-files/e_mod_main.c | 35 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/modules/everything-files/e_mod_main.c b/src/modules/everything-files/e_mod_main.c index 8cb2713..ec9e6cd 100644 --- a/src/modules/everything-files/e_mod_main.c +++ b/src/modules/everything-files/e_mod_main.c @@ -219,7 +219,7 @@ _scan_cancel_func(void *data) p->thread = NULL; if (p->cleanup) - _cleanup(EVRY_PLUGIN(p)); + E_FREE(p); } static void @@ -375,29 +375,28 @@ _cleanup(Evry_Plugin *plugin) Evry_Item_File *file; + if (p->directory) + eina_stringshare_del(p->directory); + + EINA_LIST_FREE(p->files, file) + { + _hist_add(plugin, file); + evry_item_free(EVRY_ITEM(file)); + } + + EVRY_PLUGIN_ITEMS_CLEAR(p); + + if (p->input) + eina_stringshare_del(p->input); + if (p->thread) { ecore_thread_cancel(p->thread); p->cleanup = EINA_TRUE; + return; } - else - { - if (p->directory) - eina_stringshare_del(p->directory); - - EINA_LIST_FREE(p->files, file) - { - _hist_add(plugin, file); - evry_item_free(EVRY_ITEM(file)); - } - - EVRY_PLUGIN_ITEMS_CLEAR(p); - if (p->input) - eina_stringshare_del(p->input); - - E_FREE(p); - } + E_FREE(p); } static Eina_Bool -- 2.7.4