Do not crash when using Tunnel in an IPv6-enabled build

socket_connected() is also called on the tunnel pipe.

amends 3ceb55310.
This commit is contained in:
Caspar Schutijser 2019-08-18 10:38:48 +02:00 committed by Oswald Buddenhagen
parent bf14798700
commit 7607e53d56

View File

@ -545,8 +545,10 @@ static void
socket_connected( conn_t *conn )
{
#ifdef HAVE_IPV6
freeaddrinfo( conn->addrs );
conn->addrs = 0;
if (conn->addrs) {
freeaddrinfo( conn->addrs );
conn->addrs = 0;
}
#endif
conf_notifier( &conn->notify, 0, POLLIN );
socket_expect_read( conn, 0 );