From: Mark Michelson Date: Fri, 14 Aug 2015 20:46:05 +0000 (-0500) Subject: res_pjsip_sdp_rtp: Restore removed NULL check. X-Git-Tag: 13.6.0-rc1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F1097%2F1;p=thirdparty%2Fasterisk.git res_pjsip_sdp_rtp: Restore removed NULL check. When sending an RTP keepalive, we need to be sure we're not dealing with a NULL RTP instance. There had been a NULL check, but the commit that added the rtp_timeout and rtp_hold_timeout options removed the NULL check. Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64 --- diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index d8605258f7..0a5cbcbf9b 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -115,6 +115,10 @@ static int send_keepalive(const void *data) time_t interval; int send_keepalive; + if (!rtp) { + return 0; + } + keepalive = ast_rtp_instance_get_keepalive(rtp); if (!ast_sockaddr_isnull(&session_media->direct_media_addr)) {