]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 56406 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 23 Feb 2007 20:20:00 +0000 (20:20 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 23 Feb 2007 20:20:00 +0000 (20:20 +0000)
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

channels/chan_iax2.c

index 0412d66dc1e8000e77e74fd62db18e6b1bba7b3d..bea3187beffd045cde399a77242fc7217ccc9deb 100644 (file)
@@ -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();
 }