-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zbeacon test Segmentation fault #2299
Comments
This error only occurs when using musl; there are no issues with glibc. |
this patch fix the problem diff --git a/src/zbeacon.c b/src/zbeacon.c
index ee897406..ccff27a5 100644
--- a/src/zbeacon.c
+++ b/src/zbeacon.c
@@ -369,8 +369,12 @@ 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 && bind_to != send_to ) {
+ freeaddrinfo (send_to);
+ }
} |
Isn't it that if send_to and bind_to are NULL we have some error state? |
I am not sure about the details, just very without this fix it will crash with default test on some platform. |
Can you then provide a PR? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If there no interface or only abnormal interface, linux:
The text was updated successfully, but these errors were encountered: