]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Fix dialog reference leaked to scheduler for reinvite_timeout.
authorCorey Farrell <git@cfware.com>
Thu, 19 Mar 2015 09:39:28 +0000 (09:39 +0000)
committerCorey Farrell <git@cfware.com>
Thu, 19 Mar 2015 09:39:28 +0000 (09:39 +0000)
Release the scheduler reference to the dialog for reinvite timeout during
dialog_unlink_all.

ASTERISK-24876 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4491/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@433112 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d2c734b2555676626786ba835739099e6f5af524..c378c6db4b473e95ff51a770f89fd27483b0a2e2 100644 (file)
@@ -3287,7 +3287,11 @@ void dialog_unlink_all(struct sip_pvt *dialog)
        AST_SCHED_DEL_UNREF(sched, dialog->waitid, dialog_unref(dialog, "when you delete the waitid sched, you should dec the refcount for the stored dialog ptr"));
 
        AST_SCHED_DEL_UNREF(sched, dialog->initid, dialog_unref(dialog, "when you delete the initid sched, you should dec the refcount for the stored dialog ptr"));
-       
+
+       if (dialog->reinviteid > -1) {
+               AST_SCHED_DEL_UNREF(sched, dialog->reinviteid, dialog_unref(dialog, "clear ref for reinvite_timeout"));
+       }
+
        if (dialog->autokillid > -1) {
                AST_SCHED_DEL_UNREF(sched, dialog->autokillid, dialog_unref(dialog, "when you delete the autokillid sched, you should dec the refcount for the stored dialog ptr"));
        }