From 3843480b8fe4b4fd43fce7315546bcf1265d26d2 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Thu, 23 Jul 2009 14:46:53 +0000 Subject: [PATCH] Fix potential crash if p->owner is NULL. Problem was observed when a call-forwarding loop was accidentally configured. ABE-1906 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208229 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b056a34418..b793742b10 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18869,11 +18869,11 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc case 301: /* Moved permanently */ case 302: /* Moved temporarily */ case 305: /* Use Proxy */ - { + if (p->owner) { struct ast_party_redirecting redirecting = {{0,},}; change_redirecting_information(p, req, &redirecting, TRUE); ast_channel_set_redirecting(p->owner, &redirecting); - } + } /* Fall through */ case 486: /* Busy here */ case 600: /* Busy everywhere */