]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Be sure that we're not about to set bridgepvt NULL prior to dereferencing it.
authorMark Michelson <mmichelson@digium.com>
Thu, 10 Apr 2008 19:55:33 +0000 (19:55 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 10 Apr 2008 19:55:33 +0000 (19:55 +0000)
(closes issue #11775)
Reported by: fujin

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

channels/chan_sip.c

index ef7e5171b2c032cacc5f9e91b22f9ca52d8ddb7a..c21815e231a1ae2a5cdeceb5359053d7edc4d4fa 100644 (file)
@@ -14158,7 +14158,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                                struct ast_channel *bridgepeer = NULL;
                                struct sip_pvt *bridgepvt = NULL;
                                if ((bridgepeer = ast_bridged_channel(p->owner))) {
-                                       if (bridgepeer->tech == &sip_tech || bridgepeer->tech == &sip_tech_info) {
+                                       if ((bridgepeer->tech == &sip_tech || bridgepeer->tech == &sip_tech_info) && !ast_check_hangup(bridgepeer)) {
                                                bridgepvt = (struct sip_pvt*)bridgepeer->tech_pvt;
                                                /* Does the bridged peer have T38 ? */
                                                if (bridgepvt->t38.state == T38_ENABLED) {