Skip to content
Snippets Groups Projects
Commit 15e040d3 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

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
parent bd23adbc
Branches
Tags
No related merge requests found
...@@ -5803,7 +5803,7 @@ static int sip_hangup(struct ast_channel *ast) ...@@ -5803,7 +5803,7 @@ static int sip_hangup(struct ast_channel *ast)
if (bridge) { if (bridge) {
struct sip_pvt *q = bridge->tech_pvt; 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); 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) ...@@ -20656,7 +20656,7 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req)
if (bridge) { if (bridge) {
struct sip_pvt *q = bridge->tech_pvt; 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); ast_rtp_instance_set_stats_vars(bridge, q->rtp);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment