diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-12-28 12:40:14 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-12-28 12:40:14 +0900 |
commit | 8424c2b4a35eae7003b784b2b7c9d3ad73b48972 (patch) | |
tree | 26ef393baeb0df4b3c66a88fa503c2ae84e86fe4 | |
parent | 0014d0b99e243d9c7979e87bb7e1c0a09d3205e5 (diff) | |
download | efl-8424c2b4a35eae7003b784b2b7c9d3ad73b48972.tar.gz |
evas - use freeq for common and cache images
this makes software rgba images and cache images use freeq to try and
minimize possible bugs and crashes if we hit use of freed data for
images.
-rw-r--r-- | src/lib/evas/cache/evas_cache_engine_image.c | 2 | ||||
-rw-r--r-- | src/lib/evas/common/evas_image_main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/cache/evas_cache_engine_image.c b/src/lib/evas/cache/evas_cache_engine_image.c index b3c98dc128..4757daab98 100644 --- a/src/lib/evas/cache/evas_cache_engine_image.c +++ b/src/lib/evas/cache/evas_cache_engine_image.c @@ -139,7 +139,7 @@ _evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_En else { memset(eim, 0, sizeof (Engine_Image_Entry)); - free(eim); + eina_freeq_ptr_add(eina_freeq_main_get(), eim, free, sizeof(*eim)); } } diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index 11588ad02f..2928b47314 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c @@ -584,7 +584,7 @@ _evas_common_rgba_image_delete(Image_Entry *ie) } } if (ie->f && !ie->flags.given_mmap) eina_file_close(ie->f); - free(im); + eina_freeq_ptr_add(eina_freeq_main_get(), im, free, sizeof(*im)); } static void |