In set_peername, when netaddr.ss_family == AF_UNIX. ai is never initialized.
On line 1733, freeaddrinfo is called unconditionally on ai, which might be NULL
in some cases.
The musl implementation of getaddrinfo started to segfault when you pass it
NULL. This caused some of the tests to fail on Alpine Linux, namely simple_test
inetd and unix.
This patch was enough to fix the issue
break;
}
- freeaddrinfo(ai);
+ if(ai) {
+ freeaddrinfo(ai);
+ }
msg(LOG_INFO, "connect from %s, assigned file is %s",
peername, client->exportname);
client->clientname=g_strdup(peername);