]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Do not try to unlock a non-existant channel if the transfer fails.
authorJoshua Colp <jcolp@digium.com>
Mon, 15 Dec 2008 18:11:21 +0000 (18:11 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 15 Dec 2008 18:11:21 +0000 (18:11 +0000)
(closes issue #13800)
Reported by: dwagner
Patches:
      asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608)

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

channels/chan_sip.c

index e954d5cf9731ed825d192ecb6b7486e8b6b51da4..19cc9fd6a544a1e484a56a9ac9d3272c1cec886d 100644 (file)
@@ -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;