forked from enlightenment/efl
efreetd cache - fix leak of strbuf when error conditions abort save
fix CID 1374951
This commit is contained in:
parent
91878f72f1
commit
fceb86c865
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue