efreet: fix memory leak

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

SVN revision: 73133
devs/devilhorns/wayland_egl
Sebastian Dransfeld 11 years ago
parent 402ea79bdc
commit beb582c531
  1. 4
      legacy/efreet/ChangeLog
  2. 5
      legacy/efreet/src/lib/efreet_cache.c

@ -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

@ -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);

Loading…
Cancel
Save