From Jun-ya Kato <kato@goto.info.waseda.ac.jp>.
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- if (getaddrinfo (hostname, service, &hints, &in))
+ if (getaddrinfo (hostname, service, &hints, &in0))
return -1;
for (in = in0; in; in = in->ai_next)
break;
}
- freeaddrinfo (in0);
if (server < 0)
return -1;
#else