forked from enlightenment/efl
Fix problem with orig_path and rp
We have orig_path, it is set by rp. Only problem is that it was set after efreet_desktop_read so the error handler would work as it should. Wrong solution. So now we set orig_path to NULL, so we always can free rp. SVN revision: 46880
This commit is contained in:
parent
9328392a28
commit
30c305288f
|
@ -449,15 +449,18 @@ efreet_desktop_new(const char *file)
|
||||||
|
|
||||||
desktop = NEW(Efreet_Desktop, 1);
|
desktop = NEW(Efreet_Desktop, 1);
|
||||||
if (!desktop) goto error;
|
if (!desktop) goto error;
|
||||||
desktop->orig_path = strdup(file);
|
desktop->orig_path = rp;
|
||||||
if (!efreet_desktop_read(desktop)) goto error;
|
if (!efreet_desktop_read(desktop)) goto error;
|
||||||
|
|
||||||
desktop->orig_path = rp;
|
|
||||||
desktop->ref = 1;
|
desktop->ref = 1;
|
||||||
|
|
||||||
return desktop;
|
return desktop;
|
||||||
error:
|
error:
|
||||||
if (desktop) efreet_desktop_free(desktop);
|
if (desktop)
|
||||||
|
{
|
||||||
|
desktop->orig_path = NULL;
|
||||||
|
efreet_desktop_free(desktop);
|
||||||
|
}
|
||||||
if (rp) free(rp);
|
if (rp) free(rp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue