Destroy dialog properly at unload (rizzo)
authorOlle Johansson <oej@edvina.net>
Wed, 8 Nov 2006 08:01:44 +0000 (08:01 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 8 Nov 2006 08:01:44 +0000 (08:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47313 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 727ab43..e236ff2 100644 (file)
@@ -17216,13 +17216,7 @@ static int unload_module(void)
        while (p) {
                pl = p;
                p = p->next;
-               /* Free associated memory */
-               ast_mutex_destroy(&pl->pvt_lock);
-               if (pl->chanvars) {
-                       ast_variables_destroy(pl->chanvars);
-                       pl->chanvars = NULL;
-               }
-               free(pl);
+               __sip_destroy(pl, TRUE, TRUE);
        }
        dialoglist = NULL;
        ast_mutex_unlock(&dialoglock);