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
Родитель 3a9be93a24
Коммит 23f3b65181
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;
/*