]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Remove dialog properly at unload of module (rizzo)
authorOlle Johansson <oej@edvina.net>
Wed, 8 Nov 2006 07:31:34 +0000 (07:31 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 8 Nov 2006 07:31:34 +0000 (07:31 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47307 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2c3eaa8fd7130f08afd259fd342001ca4b0965a5..dd2781c5bc5e13a075bda759908081b91db31cd8 100644 (file)
@@ -13554,13 +13554,7 @@ int unload_module()
                while (p) {
                        pl = p;
                        p = p->next;
-                       /* Free associated memory */
-                       ast_mutex_destroy(&pl->lock);
-                       if (pl->chanvars) {
-                               ast_variables_destroy(pl->chanvars);
-                               pl->chanvars = NULL;
-                       }
-                       free(pl);
+                       __sip_destroy(p, 1);
                }
                iflist = NULL;
                ast_mutex_unlock(&iflock);