forked from enlightenment/efl
fileselector: Simple refactoring to fix possible leak.
This fixes "Resource leaks" which was spotted by coverity. CID 1054518
This commit is contained in:
parent
5c49ccfb24
commit
5cfb0d9b7c
|
@ -667,21 +667,21 @@ _on_item_selected(void *data,
|
|||
if (!path)
|
||||
return;
|
||||
|
||||
sdata = malloc(sizeof(*sdata));
|
||||
sdata->fs = data;
|
||||
sdata->path = path;
|
||||
|
||||
if (sd->only_folder)
|
||||
eina_stringshare_replace(&sd->path, path);
|
||||
else
|
||||
{
|
||||
dir = ecore_file_dir_get(sdata->path);
|
||||
dir = ecore_file_dir_get(path);
|
||||
if (!dir) return;
|
||||
|
||||
eina_stringshare_replace(&sd->path, dir);
|
||||
free(dir);
|
||||
}
|
||||
|
||||
sdata = malloc(sizeof(*sdata));
|
||||
sdata->fs = data;
|
||||
sdata->path = path;
|
||||
|
||||
if (sd->sel_idler)
|
||||
{
|
||||
old_sd = ecore_idler_del(sd->sel_idler);
|
||||
|
|
Loading…
Reference in New Issue