diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-07 17:41:21 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-07 17:41:21 +0000 |
commit | 4cdb6d4b5003bce04db506c1bd94364d85077436 (patch) | |
tree | 23481fe5054869e339b3ee79bd388058da1eaee9 /channels/chan_sip.c | |
parent | b5b45e91a68dbddb76035d3f3b56bb42bdda0dfc (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@222542 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 86dcad9e5..b77876794 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -14229,7 +14229,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); /* Do something more clever here */ - ast_channel_unlock(c); + if (c) { + *nounlock = 1; + ast_channel_unlock(c); + } ast_channel_unlock(replacecall); ast_mutex_unlock(&p->refer->refer_call->lock); return 1; |