From eac66d4e5ab24a9967b7caba5635e508f3d55315 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sat, 20 Jun 2009 19:07:31 +0000 Subject: [PATCH] proper cleanup of efreet_desktop_command. Efreet API is BRAIN NUTS, some stuff you're supposed to release (list) and others are up to the callback to release. Okay, I broke e17 trying to fix efreet tests. API is so inconsistent that its own test was wrong. I'm reverting my change and fix the test, but this is bad. SVN revision: 41133 --- legacy/efreet/src/bin/ef_desktop.c | 1 + legacy/efreet/src/lib/efreet_desktop.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/legacy/efreet/src/bin/ef_desktop.c b/legacy/efreet/src/bin/ef_desktop.c index 0c62589a5d..2bf92a60b1 100644 --- a/legacy/efreet/src/bin/ef_desktop.c +++ b/legacy/efreet/src/bin/ef_desktop.c @@ -343,6 +343,7 @@ _cb_command(void *data, Efreet_Desktop *desktop __UNUSED__, info->error++; } } + free(exec); return NULL; } diff --git a/legacy/efreet/src/lib/efreet_desktop.c b/legacy/efreet/src/lib/efreet_desktop.c index 29ed8f8fbc..18ebd131a6 100644 --- a/legacy/efreet/src/lib/efreet_desktop.c +++ b/legacy/efreet/src/lib/efreet_desktop.c @@ -1226,8 +1226,7 @@ efreet_desktop_command_progress_get(Efreet_Desktop *desktop, Eina_List *files, execs = efreet_desktop_command_build(command); ret = efreet_desktop_command_execs_process(command, execs); - EINA_LIST_FREE(execs, exec) - free(exec); + eina_list_free(execs); efreet_desktop_command_free(command); } @@ -1788,8 +1787,7 @@ efreet_desktop_cb_download_complete(void *data, const char *file __UNUSED__, execs = efreet_desktop_command_build(f->command); /* TODO: Need to handle the return value from efreet_desktop_command_execs_process */ efreet_desktop_command_execs_process(f->command, execs); - EINA_LIST_FREE(execs, exec) - free(exec); + eina_list_free(execs); efreet_desktop_command_free(f->command); } }