diff --git a/src/mod/applications/mod_hash/mod_hash.c b/src/mod/applications/mod_hash/mod_hash.c index 133f05de3e..fdc12bee2b 100644 --- a/src/mod/applications/mod_hash/mod_hash.c +++ b/src/mod/applications/mod_hash/mod_hash.c @@ -280,12 +280,13 @@ SWITCH_LIMIT_RELEASE(limit_release_hash) limit_hash_private_t *pvt = switch_channel_get_private(channel, "limit_hash"); limit_hash_item_t *item = NULL; + switch_thread_rwlock_wrlock(globals.limit_hash_rwlock); + if (!pvt || !pvt->hash) { + switch_thread_rwlock_unlock(globals.limit_hash_rwlock); return SWITCH_STATUS_SUCCESS; } - switch_thread_rwlock_wrlock(globals.limit_hash_rwlock); - /* clear for uuid */ if (realm == NULL && resource == NULL) { switch_hash_index_t *hi = NULL;