gif loader - dup eina file as we keep our own copy of it in the loader

we didnt dup the eina file handle since  we kee our own handle. we
need ot do that. asan found this.
This commit is contained in:
Carsten Haitzler 2019-08-05 18:47:20 +01:00 committed by Mike Blumenkrantz
parent 5dcb842da8
commit c7e644b072
1 changed files with 2 additions and 1 deletions

View File

@ -881,7 +881,7 @@ evas_image_load_file_open_gif2(Eina_File *f,
*error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
return NULL;
}
loader->f = f;
loader->f = eina_file_dup(f);
loader->opts = opts;
loader->animated = animated;
return loader;
@ -899,6 +899,7 @@ evas_image_load_file_close_gif2(void *loader_data)
#endif
if ((loader->fi.map) && (loader->f))
eina_file_map_free(loader->f, loader->fi.map);
if (loader->f) eina_file_close(loader->f);
free(loader);
}