summaryrefslogtreecommitdiff
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
parent91878f72f1ef9cfc790be19f0d5cc8dcdece02a3 (diff)
efreetd cache - fix leak of strbuf when error conditions abort save
fix CID 1374951
Diffstat (limited to '')
-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)
183 Eina_Tmpstr *tmpstr = NULL; 183 Eina_Tmpstr *tmpstr = NULL;
184 int tmpfd; 184 int tmpfd;
185 185
186 buf = eina_strbuf_new();
187 if (!buf) return;
188
189 // only if subdirs need saving... and we have subdirs. 186 // only if subdirs need saving... and we have subdirs.
190 if (!subdir_need_save) return; 187 if (!subdir_need_save) return;
191 if (!subdir_cache) return; 188 if (!subdir_cache) return;
192 if (!subdir_cache->dirs) return; 189 if (!subdir_cache->dirs) return;
193 190
191 buf = eina_strbuf_new();
192 if (!buf) return;
193
194 // save to tmp file first 194 // save to tmp file first
195 eina_strbuf_append_printf(buf, "%s/efreet/subdirs_%s.eet.XXXXXX.cache", 195 eina_strbuf_append_printf(buf, "%s/efreet/subdirs_%s.eet.XXXXXX.cache",
196 efreet_cache_home_get(), efreet_hostname_get()); 196 efreet_cache_home_get(), efreet_hostname_get());