Avoid leaking memory on mod_hash unload

This commit is contained in:
Travis Cross 2014-04-12 06:43:11 +00:00
parent 237da22e22
commit 886a730ae8
1 changed files with 2 additions and 0 deletions

View File

@ -1070,12 +1070,14 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
switch_core_hash_destroy(&globals.limit_hash);
switch_core_hash_destroy(&globals.db_hash);
switch_core_hash_destroy(&globals.remote_hash);
switch_thread_rwlock_unlock(globals.limit_hash_rwlock);
switch_thread_rwlock_unlock(globals.db_hash_rwlock);
switch_thread_rwlock_destroy(globals.db_hash_rwlock);
switch_thread_rwlock_destroy(globals.limit_hash_rwlock);
switch_thread_rwlock_destroy(globals.remote_hash_rwlock);
return SWITCH_STATUS_SUCCESS;