[asterisk-commits] tilghman: trunk r187674 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 10 10:59:45 CDT 2009


Author: tilghman
Date: Fri Apr 10 10:59:40 2009
New Revision: 187674

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=187674
Log:
Ensure pvt is not NULL before dereferencing it.
(closes issue #14784)
 Reported by: pj

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=187674&r1=187673&r2=187674
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr 10 10:59:40 2009
@@ -5803,7 +5803,7 @@
 				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 @@
 		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);
 			}
 		}




More information about the asterisk-commits mailing list