mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Unix sk_namelookup: fix compile failure at -DNO_IPV6.
The variable 'strbuf *realhost' was only initialised in the branch of the ifdefs where IPV6 is enabled, so at NO_IPV6, it's used uninitialised, which in my usual build configuration means a compile failure.
This commit is contained in:
parent
ed8a47c1dd
commit
af3ccd7946
@ -195,7 +195,7 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
||||
struct hostent *h = NULL;
|
||||
int n;
|
||||
#endif
|
||||
strbuf *realhost;
|
||||
strbuf *realhost = strbuf_new();
|
||||
|
||||
/* Clear the structure and default to IPv4. */
|
||||
memset(ret, 0, sizeof(SockAddr));
|
||||
@ -225,7 +225,6 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
||||
}
|
||||
ret->superfamily = IP;
|
||||
|
||||
realhost = strbuf_new();
|
||||
if (ret->ais->ai_canonname != NULL)
|
||||
strbuf_catf(realhost, "%s", ret->ais->ai_canonname);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user