'everything' fix leaks

SVN revision: 47925
This commit is contained in:
Hannes Janetzek 2010-04-11 13:40:10 +00:00
parent 17ef9bfc23
commit f33a765765
4 changed files with 15 additions and 6 deletions

View File

@ -424,10 +424,10 @@ evry_plugin_free(Evry_Plugin *p, int free_pointer)
if (p->trigger) eina_stringshare_del(p->trigger);
if (p->icon) eina_stringshare_del(p->icon);
if (!free_pointer)
return;
else if (p->free)
if (p->free)
p->free(p);
else if (!free_pointer)
return;
else
E_FREE(p);
}

View File

@ -754,12 +754,13 @@ _evry_selector_free(Evry_Selector *sel)
if (list->visible && (sel == selector))
_evry_view_clear(sel->state);
evry_plugin_free(sel->aggregator, 1);
while (sel->states)
_evry_state_pop(sel);
if (sel->aggregator)
evry_plugin_free(sel->aggregator, 1);
if (sel->actions)
evry_plug_actions_free(sel->actions);

View File

@ -195,6 +195,11 @@ evry_history_unload(void)
e_config_domain_save("module.everything.history", hist_edd, evry_hist);
eina_hash_foreach(evry_hist->subjects, _hist_free_cb, NULL);
eina_hash_foreach(evry_hist->actions, _hist_free_cb, NULL);
eina_hash_free(evry_hist->subjects);
eina_hash_free(evry_hist->actions);
E_FREE(evry_hist);
evry_hist = NULL;
}

View File

@ -233,7 +233,9 @@ _action(Evry_Plugin *plugin, const Evry_Item *it)
static void
_cleanup(Evry_Plugin *plugin)
{
EVRY_PLUGIN_ITEMS_FREE(plugin);
Evry_Item *it;
EINA_LIST_FREE(plugin->items, it)
evry_item_free(it);
}
static Evas_Object *
@ -257,6 +259,7 @@ _plugin_free(Evry_Plugin *plugin)
{
PLUGIN(p, plugin);
E_FREE(plugin->config);
E_FREE(p);
}