forked from enlightenment/efl
elementary_config: Fix possible leak when ELM_EFREET is enabled
This commit is contained in:
parent
5451fe2cb6
commit
64371a5981
|
@ -2476,6 +2476,8 @@ _profiles_list_selected_cb(void *data,
|
|||
else
|
||||
{
|
||||
if (desk) efreet_desktop_free(desk);
|
||||
if (pdir) elm_config_profile_dir_free(pdir);
|
||||
|
||||
pdir = elm_config_profile_dir_get(sel_profile, EINA_FALSE);
|
||||
snprintf(buf, sizeof(buf), "%s/profile.desktop", pdir);
|
||||
desk = efreet_desktop_new(buf);
|
||||
|
@ -2552,6 +2554,8 @@ _profiles_list_fill(Evas_Object *l_widget,
|
|||
else
|
||||
{
|
||||
if (desk) efreet_desktop_free(desk);
|
||||
if (pdir) elm_config_profile_dir_free(pdir);
|
||||
|
||||
pdir = elm_config_profile_dir_get(profile, EINA_FALSE);
|
||||
snprintf(buf, sizeof(buf), "%s/profile.desktop", pdir);
|
||||
desk = efreet_desktop_new(buf);
|
||||
|
|
Loading…
Reference in New Issue