don't crash when dns lookup fails (ipv6 path)
we call socket_connect_bail() when getaddrinfo() failed, so it must deal with no addrinfo being there yet.
This commit is contained in:
parent
cda596d530
commit
89dc7592ee
|
@ -520,7 +520,10 @@ static void
|
||||||
socket_connect_bail( conn_t *conn )
|
socket_connect_bail( conn_t *conn )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
freeaddrinfo( conn->addrs );
|
if (conn->addrs) {
|
||||||
|
freeaddrinfo( conn->addrs );
|
||||||
|
conn->addrs = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
free( conn->name );
|
free( conn->name );
|
||||||
conn->name = 0;
|
conn->name = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user