summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 18:47:20 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 18:59:33 +0100
commitc56791180d4860d710dfe89d2c568ab65bd3fef2 (patch)
tree8dfe64bcd0f8559cac307fee05c17b79de75ee93
parent1bd9a8f232ec1891cc396d13d7106aa7c255d78e (diff)
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.
-rw-r--r--src/modules/evas/image_loaders/gif/evas_image_load_gif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
index 308f909c86..02412a280d 100644
--- a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
@@ -881,7 +881,7 @@ evas_image_load_file_open_gif2(Eina_File *f,
881 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; 881 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
882 return NULL; 882 return NULL;
883 } 883 }
884 loader->f = f; 884 loader->f = eina_file_dup(f);
885 loader->opts = opts; 885 loader->opts = opts;
886 loader->animated = animated; 886 loader->animated = animated;
887 return loader; 887 return loader;
@@ -899,6 +899,7 @@ evas_image_load_file_close_gif2(void *loader_data)
899#endif 899#endif
900 if ((loader->fi.map) && (loader->f)) 900 if ((loader->fi.map) && (loader->f))
901 eina_file_map_free(loader->f, loader->fi.map); 901 eina_file_map_free(loader->f, loader->fi.map);
902 if (loader->f) eina_file_close(loader->f);
902 free(loader); 903 free(loader);
903} 904}
904 905