From 1aa2bf8d77d83ff94a951695bd55ab5a0a09873d Mon Sep 17 00:00:00 2001 From: William King Date: Mon, 4 Apr 2016 22:04:22 -0500 Subject: [PATCH] FS-8978 part two --- src/mod/applications/mod_hiredis/mod_hiredis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mod/applications/mod_hiredis/mod_hiredis.c b/src/mod/applications/mod_hiredis/mod_hiredis.c index 2af3cd3598..d3b5ab7e11 100644 --- a/src/mod/applications/mod_hiredis/mod_hiredis.c +++ b/src/mod/applications/mod_hiredis/mod_hiredis.c @@ -198,14 +198,12 @@ SWITCH_LIMIT_RELEASE(hiredis_limit_release) profile = switch_core_hash_find(mod_hiredis_globals.profiles, limit_pvt->realm); hashkey = switch_mprintf("decr %s", tmp->limit_key); - if ( limit_pvt && (limit_pvt->interval > 0) && (hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS)) { + if ( tmp && (tmp->interval > 0) && (hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: profile[%s] error executing [%s] because [%s]\n", tmp->realm, hashkey, response); } - limit_pvt = tmp->next; - - tmp = limit_pvt; + tmp = tmp->next; switch_safe_free(response); switch_safe_free(hashkey); }