From 27bfa2b65e3a948357740b2cf521927a53c75368 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 13 Feb 2014 06:22:13 +0500 Subject: [PATCH] FS-6217 --resolve --- src/switch_xml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index e1695c48a3..74bc6d28b6 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1940,6 +1940,7 @@ SWITCH_DECLARE(uint32_t) switch_xml_clear_user_cache(const char *key, const char char mega_key[1024]; int r = 0; switch_xml_t lookup; + char *expires_val = NULL; switch_mutex_lock(CACHE_MUTEX); @@ -1948,8 +1949,10 @@ SWITCH_DECLARE(uint32_t) switch_xml_clear_user_cache(const char *key, const char if ((lookup = switch_core_hash_find(CACHE_HASH, mega_key))) { switch_core_hash_delete(CACHE_HASH, mega_key); - if ((lookup = switch_core_hash_find(CACHE_EXPIRES_HASH, mega_key))) { + if ((expires_val = switch_core_hash_find(CACHE_EXPIRES_HASH, mega_key))) { switch_core_hash_delete(CACHE_EXPIRES_HASH, mega_key); + free(expires_val); + expires_val = NULL; } switch_xml_free(lookup); r++;