1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Merge branch 'pre-0.64'

This commit is contained in:
Simon Tatham
2014-12-20 18:52:40 +00:00
3 changed files with 18 additions and 8 deletions

View File

@ -780,7 +780,7 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i
{
int s;
#ifndef NO_IPV6
struct addrinfo hints, *ai;
struct addrinfo hints, *ai = NULL;
char portstr[6];
#endif
union sockaddr_union u;
@ -926,6 +926,12 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i
}
retcode = bind(s, &addr->sa, addrlen);
#ifndef NO_IPV6
if (ai)
freeaddrinfo(ai);
#endif
if (retcode < 0) {
close(s);
ret->error = strerror(errno);