1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix a bad free on portfwd name resolution failure.

If name resolution fails, pfd_connect tries to sfree(dummy_realhost)
when it's completely uninitialised - the failed resolution didn't
write to it, and we also didn't precautionarily initialise it to NULL
first. Now we do the latter.
This commit is contained in:
Simon Tatham 2018-05-25 14:03:13 +01:00
parent 3a9be93a24
commit 23f3b65181

View File

@ -433,7 +433,7 @@ char *pfd_connect(struct PortForwarding **pf_ret, char *hostname,int port,
SockAddr addr;
const char *err;
char *dummy_realhost;
char *dummy_realhost = NULL;
struct PortForwarding *pf;
/*