]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8978 part two
authorWilliam King <william.king@quentustech.com>
Tue, 5 Apr 2016 03:04:22 +0000 (22:04 -0500)
committerWilliam King <william.king@quentustech.com>
Tue, 5 Apr 2016 03:04:22 +0000 (22:04 -0500)
src/mod/applications/mod_hiredis/mod_hiredis.c

index 2af3cd359830746b37b81b54c27cf6bc99a832e4..d3b5ab7e1117b080dd228cdd112657c9e7b44b21 100644 (file)
@@ -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);
                }