From: Russell Bryant Date: Fri, 23 Feb 2007 20:20:00 +0000 (+0000) Subject: Merged revisions 56406 via svnmerge from X-Git-Tag: 1.4.1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76a643978ec45f8cd023b54416282a9c0cb8fcfa;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@56407 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 0412d66dc1..bea3187bef 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(); }