summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-07-02 08:17:02 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-07-02 08:17:02 +0000
commitbeb582c5318e196d042adf0a30756bd662bb393a (patch)
tree78305dce75d1de21cd37b944a003f12af8969c68
parent402ea79bdc3c8e8c48b4d7e9b6eab49905b72d05 (diff)
efreet: fix memory leak
Don't allocate event structure unless we have a cache change. SVN revision: 73133
-rw-r--r--legacy/efreet/ChangeLog4
-rw-r--r--legacy/efreet/src/lib/efreet_cache.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/legacy/efreet/ChangeLog b/legacy/efreet/ChangeLog
index 9d31d4d669..46f09957f4 100644
--- a/legacy/efreet/ChangeLog
+++ b/legacy/efreet/ChangeLog
@@ -126,3 +126,7 @@
1262012-06-25 Sebastian Dransfeld 1262012-06-25 Sebastian Dransfeld
127 127
128 * Support XDG_DESKTOP_DIR and read user-dirs.dirs 128 * Support XDG_DESKTOP_DIR and read user-dirs.dirs
129
1302012-07-02 Sebastian Dransfeld
131
132 * Fix minor memory leak in cache update handler
diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c
index 1bebed8ed0..9e84fbc32c 100644
--- a/legacy/efreet/src/lib/efreet_cache.c
+++ b/legacy/efreet/src/lib/efreet_cache.c
@@ -1113,10 +1113,11 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
1113 if (!file) return; 1113 if (!file) return;
1114 if (!strcmp(file, "desktop_data.update")) 1114 if (!strcmp(file, "desktop_data.update"))
1115 { 1115 {
1116 ev = NEW(Efreet_Event_Cache_Update, 1);
1117 if (!ev) goto error;
1118 if (cache_check_change(path)) 1116 if (cache_check_change(path))
1119 { 1117 {
1118 ev = NEW(Efreet_Event_Cache_Update, 1);
1119 if (!ev) goto error;
1120
1120 IF_RELEASE(util_cache_names_key); 1121 IF_RELEASE(util_cache_names_key);
1121 IF_RELEASE(util_cache_hash_key); 1122 IF_RELEASE(util_cache_hash_key);
1122 1123