summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_common_generic_cache.c
diff options
context:
space:
mode:
authorSubhransu Mohanty <smohantty@gmail.com>2020-06-03 13:03:39 +0900
committerHermet Park <chuneon.park@samsung.com>2020-06-03 13:03:39 +0900
commit97f4f7127a653db1ad1b69ecb3a2cb788ee8c5a1 (patch)
tree86862ded7e1ac1460b2d840278382ffafd742013 /src/lib/evas/common/evas_common_generic_cache.c
parentc77a34402a9ea21ce18fb05c01f546f7898cc557 (diff)
evas/engine: Fix memory leak in generic cache.
Summary: During shutdown we used to call engine_image_free() which was causing some deadlock. as we have evas_cache which takes care of freeing all the images we just have to delete the generic cache without freeing the image during shutdown. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11915
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_common_generic_cache.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/evas/common/evas_common_generic_cache.c b/src/lib/evas/common/evas_common_generic_cache.c
index ddb055deb2..4fc5a8bbac 100644
--- a/src/lib/evas/common/evas_common_generic_cache.c
+++ b/src/lib/evas/common/evas_common_generic_cache.c
@@ -14,8 +14,17 @@ generic_cache_new(void *user_data, Generic_Cache_Free func)
14EAPI void 14EAPI void
15generic_cache_destroy(Generic_Cache *cache) 15generic_cache_destroy(Generic_Cache *cache)
16{ 16{
17 generic_cache_dump(cache); 17 Generic_Cache_Entry *entry;
18 eina_hash_free(cache->hash); 18 if (cache)
19 {
20 EINA_LIST_FREE(cache->lru_list, entry)
21 {
22 free(entry);
23 }
24
25 eina_hash_free(cache->hash);
26 free(cache);
27 }
19} 28}
20 29
21EAPI void 30EAPI void