aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-23 20:20:00 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-23 20:20:00 +0000
commit17d716384061d8a63ef12976e7026521baf0b6ee (patch)
tree1b14b422ed7594aac1a9baa1bd88b1d02ab0f79c
parent931e649c3e417473511c763935c60a90508f6a1a (diff)
Merged revisions 56406 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56406 | russell | 2007-02-23 14:17:56 -0600 (Fri, 23 Feb 2007) | 4 lines Don't destroy mutexes before unregistering all of the entry points from the core. Also, fix a potential memory leak from not destroying the locks for all of the possible call numbers (about 32k of them). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56407 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_iax2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 0412d66dc..bea3187be 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -9949,12 +9949,17 @@ static int __unload_module(void)
delete_users();
iax_provision_unload();
sched_context_destroy(sched);
+
+ ast_mutex_destroy(&waresl.lock);
+
+ for (x = 0; x < IAX_MAX_CALLS; x++)
+ ast_mutex_destroy(&iaxsl[x]);
+
return 0;
}
static int unload_module(void)
{
- ast_mutex_destroy(&waresl.lock);
ast_custom_function_unregister(&iaxpeer_function);
return __unload_module();
}