diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-10 15:59:40 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-10 15:59:40 +0000 |
commit | 15e040d3f3c5b7b25a7ce847f33b201ac0a5d454 (patch) | |
tree | fa984fc5f845f7eb00141407475abf76a88321c7 /channels | |
parent | bd23adbc8a13073a59b59e05abd7602a5fdefc6d (diff) |
Ensure pvt is not NULL before dereferencing it.
(closes issue #14784)
Reported by: pj
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 34e00ff38..8b6aef710 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5803,7 +5803,7 @@ static int sip_hangup(struct ast_channel *ast) if (bridge) { struct sip_pvt *q = bridge->tech_pvt; - if (IS_SIP_TECH(bridge->tech) && q) { + if (IS_SIP_TECH(bridge->tech) && q && q->rtp) { ast_rtp_instance_set_stats_vars(bridge, q->rtp); } } @@ -20656,7 +20656,7 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req) if (bridge) { struct sip_pvt *q = bridge->tech_pvt; - if (IS_SIP_TECH(bridge->tech) && q->rtp) { + if (IS_SIP_TECH(bridge->tech) && q && q->rtp) { ast_rtp_instance_set_stats_vars(bridge, q->rtp); } } |