Skip to content

Commit

Permalink
nat_traversal: check parameter for send_keepalive()
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 8, 2021
1 parent c200d2e commit f33abd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/nat_traversal/nat_traversal.c
Expand Up @@ -1554,6 +1554,11 @@ static void send_keepalive(NAT_Contact *contact)
unsigned short lport;
char lproto;

if(contact==NULL || contact->socket==NULL) {
LM_ERR("invalid parameters\n");
return;
}

if(keepalive_params.from == NULL) {
if(contact->socket != last_socket) {
memcpy(from_ip, contact->socket->address_str.s,
Expand Down

0 comments on commit f33abd5

Please sign in to comment.