fix possible memleak when creating new app menu entries

klocwork issue
This commit is contained in:
Mike Blumenkrantz 2013-05-20 10:25:49 +01:00
parent a019ffb7ac
commit 1b8c6fc89a
1 changed files with 7 additions and 1 deletions

View File

@ -723,7 +723,13 @@ _e_int_menus_app_config_append(Efreet_Desktop *desktop)
EINA_LIST_FOREACH_SAFE(e_config->menu_applications, l, l_next, ma)
{
if ((!strcmp(ma->orig_path, cma->orig_path)) && (ma->load_time == cma->load_time))
return ma->exec_valid;
{
eina_stringshare_del(cma->orig_path);
eina_stringshare_del(cma->try_exec);
eina_stringshare_del(cma->exec);
free(cma);
return ma->exec_valid;
}
if ((!strcmp(ma->orig_path, cma->orig_path)) && (ma->load_time != cma->load_time))
{