raster pushed a commit to branch master.

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

commit ce44122f61f44af0e68901868b4cf0511ec36659
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Aug 5 14:28:40 2019 +0100

    elm theme - fix leak in error cse in elm theme mmap set
    
    we don't free the eina file handle on error. coverity found it. fix
    
    fix CID 1402680
---
 src/lib/elementary/elm_theme.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c
index 62397d1c09..4f8b57e4e9 100644
--- a/src/lib/elementary/elm_theme.c
+++ b/src/lib/elementary/elm_theme.c
@@ -651,7 +651,11 @@ elm_theme_overlay_mmap_add(Elm_Theme *th, const Eina_File 
*f)
    Eina_File *file = eina_file_dup(f);
 
    if (!th) th = theme_default;
-   if (!th) return;
+   if (!th)
+     {
+        eina_file_close(file);
+        return;
+     }
    th->overlay_items = eina_list_free(th->overlay_items);
    _elm_theme_item_finalize(&th->overlay, eina_file_filename_get(file), file, 
EINA_TRUE, EINA_FALSE);
    elm_theme_flush(th);

-- 


Reply via email to