raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fceb86c865d6157677955dc41199d78a64a314c6

commit fceb86c865d6157677955dc41199d78a64a314c6
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Jul 23 18:11:26 2017 +0900

    efreetd cache - fix leak of strbuf when error conditions abort save
    
    fix CID 1374951
---
 src/bin/efreet/efreetd_cache.c | 6 +++---
 1 file 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());

-- 


Reply via email to