aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 18:11:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 18:11:26 +0900
commitfceb86c865d6157677955dc41199d78a64a314c6 (patch)
tree1e1004a8d0562ce4de8ec374018d16a0e97eed10 /src/bin/efreet
parentefreetd cache - handle queue case leaking strbuf (diff)
downloadefl-fceb86c865d6157677955dc41199d78a64a314c6.tar.gz
efreetd cache - fix leak of strbuf when error conditions abort save
fix CID 1374951
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreetd_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 2e70ff0eee..f0c27ae1a4 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -183,14 +183,14 @@ subdir_cache_save(void)
Eina_Tmpstr *tmpstr = NULL;
int tmpfd;
- buf = eina_strbuf_new();
- if (!buf) return;
-
// only if subdirs need saving... and we have subdirs.
if (!subdir_need_save) return;
if (!subdir_cache) return;
if (!subdir_cache->dirs) return;
+ buf = eina_strbuf_new();
+ if (!buf) return;
+
// save to tmp file first
eina_strbuf_append_printf(buf, "%s/efreet/subdirs_%s.eet.XXXXXX.cache",
efreet_cache_home_get(), efreet_hostname_get());