1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/connman/musl.patch

18 lines
420 B
Diff

In musl > 1.1.21 freeaddrinfo() implementation changed and
was causing a segmentation fault.
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 393afe0..12fcb1d 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1274,7 +1274,8 @@ static bool is_ip_address(const char *host)
addr = NULL;
result = getaddrinfo(host, NULL, &hints, &addr);
- freeaddrinfo(addr);
+ if(!result)
+ freeaddrinfo(addr);
return result == 0;
}