From: Mark Michelson Date: Thu, 11 Jun 2009 21:18:37 +0000 (+0000) Subject: Merged revisions 200146 via svnmerge from X-Git-Tag: 1.6.1.3-rc1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb76dba60abddced0c73b0b7b5cd030ce67b8a81;p=thirdparty%2Fasterisk.git Merged revisions 200146 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r200146 | mmichelson | 2009-06-11 16:17:14 -0500 (Thu, 11 Jun 2009) | 5 lines Fix a crash due to a potentially NULL p->options. Thanks to mnicholson for pointing it out. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@200152 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0d6a1a5115..ab62db4a07 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8171,7 +8171,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in * Similarly, if we need to re-send an INVITE with auth credentials, then we * need to use the same branch as we did the first time we sent the INVITE. */ - if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) { + if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && p->options && !ast_strlen_zero(p->options->auth))) { p->branch = p->invite_branch; build_via(p); } else if (newbranch) {