X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinnet.c;h=85e7d0c9560ee88291d52dc3b3a82d58072a301c;hb=8316deb3399fe1d0c406132cf2e795a76de26b64;hp=1ddfa5c7613590ea0a1ff14fc104586347bfac20;hpb=02596122374b4a9d781743ca35e1b33e531eddf7;p=PuTTY.git diff --git a/windows/winnet.c b/windows/winnet.c index 1ddfa5c7..85e7d0c9 100644 --- a/windows/winnet.c +++ b/windows/winnet.c @@ -353,6 +353,9 @@ SockAddr sk_namelookup(const char *host, char **canonicalname, address_family == ADDRTYPE_IPV6 ? AF_INET6 : #endif AF_UNSPEC); +#ifndef NO_IPV6 + ret->ai = ret->ais = NULL; +#endif ret_family = AF_UNSPEC; *realhost = '\0'; @@ -456,6 +459,10 @@ SockAddr sk_nonamelookup(const char *host) SockAddr ret = snew(struct SockAddr_tag); ret->error = NULL; ret->family = AF_UNSPEC; +#ifndef NO_IPV6 + ret->ai = ret->ais = NULL; +#endif + ret->naddresses = 0; strncpy(ret->hostname, host, lenof(ret->hostname)); ret->hostname[lenof(ret->hostname)-1] = '\0'; return ret;