From 8965905d4976e22d897c3e5e293fd5ff89db1c23 Mon Sep 17 00:00:00 2001 From: calvin2021y <85545400+calvin2021y@users.noreply.github.com> Date: Thu, 12 Sep 2024 19:10:01 +0800 Subject: [PATCH] fix zbeacon test segmentation fault --- src/zbeacon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }