diff --git a/src/zbeacon.c b/src/zbeacon.c index ee8974061..63333c926 100644 --- a/src/zbeacon.c +++ b/src/zbeacon.c @@ -369,8 +369,8 @@ s_self_prepare_udp (self_t *self) self->udpsock_send = INVALID_SOCKET; } - freeaddrinfo (bind_to); - freeaddrinfo (send_to); + if( bind_to != NULL ) freeaddrinfo (bind_to); + if( send_to != NULL ) freeaddrinfo (send_to); }