aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 18:11:21 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-15 18:11:21 +0000
commit70c1df69603ef59791c57d5f9fd86ef6a13c3f45 (patch)
treecc9bee0f548c74785a4076dd2605f8c928937f4c /channels
parent0b321028e4e0939ea8c4d39fa53bc34b19bc14c8 (diff)
Do not try to unlock a non-existant channel if the transfer fails.
(closes issue #13800) Reported by: dwagner Patches: asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164350 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e954d5cf9..19cc9fd6a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -14313,7 +14313,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
ast_mutex_unlock(&p->lock);
if (p->refer->refer_call) {
ast_mutex_unlock(&p->refer->refer_call->lock);
- ast_channel_unlock(p->refer->refer_call->owner);
+ if (p->refer->refer_call->owner) {
+ ast_channel_unlock(p->refer->refer_call->owner);
+ }
}
p->invitestate = INV_COMPLETED;
return -1;