X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8faa456cf83ade45a6a2f33784d46b9963a0f77e..6e1ebb76bc65c074b780b303a1f1550f5ae4dd3c:/ssh.c diff --git a/ssh.c b/ssh.c index 9f0fe618..e120c152 100644 --- a/ssh.c +++ b/ssh.c @@ -1505,7 +1505,8 @@ static int ssh_receive(Plug plug, int urgent, char *data, int len) /* * Connect to specified host and port. * Returns an error message, or NULL on success. - * Also places the canonical host name into `realhost'. + * Also places the canonical host name into `realhost'. It must be + * freed by the caller. */ static char *connect_to_host(char *host, int port, char **realhost) { @@ -1545,7 +1546,7 @@ static char *connect_to_host(char *host, int port, char **realhost) return err; #ifdef FWHACK - *realhost = FWhost; + *realhost = strdup(FWhost); #endif /*