]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 222543 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Wed, 7 Oct 2009 17:46:37 +0000 (17:46 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 7 Oct 2009 17:46:37 +0000 (17:46 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r222543 | dvossel | 2009-10-07 12:44:52 -0500 (Wed, 07 Oct 2009) | 14 lines

  Merged revisions 222542 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines

    crash on transfer

    handle_invite_replaces() attempts to uplock a pvt's
    owner channel without first verifing that it exists.

    (issue #16027)
  ........
................

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

channels/chan_sip.c

index 5610d3cc7a05b55a8647bbf150df08ac371855a0..3db6e6e6bf9c546deacc5d32de36b904e0c9b247 100644 (file)
@@ -17890,7 +17890,10 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in
                        can't harm */
                transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE, FALSE);
                /* Do something more clever here */
-               ast_channel_unlock(c);
+               if (c) {
+                       *nounlock = 1;
+                       ast_channel_unlock(c);
+               }
                ast_channel_unlock(replacecall);
                sip_pvt_unlock(p->refer->refer_call);
                return 1;