Commit 9210482b authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews

iax2: prevent possible null pointer dereferences

Refs #46004

Change-Id: I15796bca88d6997cf75ed7616ff1af207401631b
parent 4c895dba
......@@ -499,7 +499,7 @@ int iax_get_netstats(struct iax_session *session, int *rtt, struct iax_netstat *
{
jb_info stats;
if(!iax_session_valid(session)) return -1;
if(!session || !iax_session_valid(session)) return -1;
*rtt = session->pingtime;
......@@ -1848,7 +1848,7 @@ static void send_ping(void *s)
struct iax_session *session = (struct iax_session *)s;
/* important, eh? */
if(!iax_session_valid(session)) return;
if(!session || !iax_session_valid(session)) return;
send_command(session, AST_FRAME_IAX, IAX_COMMAND_PING, 0, NULL, 0, -1);
session->pingid = iax_sched_add(NULL,NULL, send_ping, (void *)session, ping_time * 1000);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment