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
This commit is contained in:
Carsten Haitzler 2019-08-05 14:28:40 +01:00
parent 970b620f5a
commit ce44122f61
1 changed files with 5 additions and 1 deletions

View File

@ -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);