From a13adfb5e2a5ebbbbecb84a46b620bb7853ddf41 Mon Sep 17 00:00:00 2001 From: englebass Date: Sat, 5 Feb 2011 20:03:18 +0000 Subject: [PATCH] Fix segv, clear mem cache on eet file close Patch by Hannes Janetzek git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@56735 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 4 ++++ src/lib/efreet_utils.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 065e02e..cc61e00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,3 +38,7 @@ in efreet_init() * Set EFREET_MODULE_LOG_DOM variable to -1 after unregister * Remove duplicate logging macros + +2011-02-05 Hannes Janetzek + + * Clear mem cache when closing eet file diff --git a/src/lib/efreet_utils.c b/src/lib/efreet_utils.c index bb4b960..deb0abb 100644 --- a/src/lib/efreet_utils.c +++ b/src/lib/efreet_utils.c @@ -671,6 +671,20 @@ efreet_util_cache_names(Eet_Data_Descriptor *edd, const char *key) void efreet_util_desktop_cache_reload(void) { + if (cache_names) + { + IF_RELEASE(cache_names_key); + efreet_cache_array_string_free(cache_names); + cache_names = NULL; + } + if (cache_hash) + { + IF_RELEASE(cache_hash_key); + eina_hash_free(cache_hash->hash); + free(cache_hash); + cache_hash = NULL; + } + cache = efreet_cache_close(cache); } -- 2.7.4