aboutsummaryrefslogtreecommitdiffstats
path: root/community/connman/musl.patch
blob: f87807f360a877b31216525584212429e73cc8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
 }