diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-05 14:28:40 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-05 14:28:40 +0100 |
commit | ce44122f61f44af0e68901868b4cf0511ec36659 (patch) | |
tree | b5dc380b8b6f1083fbaf1f8b6c2755dbac363bba | |
parent | 970b620f5afe6b9d69226776868f26adc110ce40 (diff) | |
download | efl-ce44122f61f44af0e68901868b4cf0511ec36659.tar.gz |
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
-rw-r--r-- | src/lib/elementary/elm_theme.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |