efreet: fix memory leak

Don't allocate event structure unless we have a cache change.

SVN revision: 73133
This commit is contained in:
Sebastian Dransfeld 2012-07-02 08:17:02 +00:00
parent 402ea79bdc
commit beb582c531
2 changed files with 7 additions and 2 deletions

View File

@ -126,3 +126,7 @@
2012-06-25 Sebastian Dransfeld
* Support XDG_DESKTOP_DIR and read user-dirs.dirs
2012-07-02 Sebastian Dransfeld
* Fix minor memory leak in cache update handler

View File

@ -1113,10 +1113,11 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
if (!file) return;
if (!strcmp(file, "desktop_data.update"))
{
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
if (cache_check_change(path))
{
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
IF_RELEASE(util_cache_names_key);
IF_RELEASE(util_cache_hash_key);