diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-23 18:11:26 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-23 18:11:26 +0900 |
commit | fceb86c865d6157677955dc41199d78a64a314c6 (patch) | |
tree | 1e1004a8d0562ce4de8ec374018d16a0e97eed10 /src/bin/efreet | |
parent | 91878f72f1ef9cfc790be19f0d5cc8dcdece02a3 (diff) | |
download | efl-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.c | 6 |
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()); |