X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=raw.c;h=a7fbbc5cc5f32e8c23feae149dc53c5a3193795a;hb=cc66c86e7311c97db09da989c340ba3108c9e14f;hp=698d7e4f813f83103418da57dd89cd1198b1d918;hpb=38b668648aa0f832600f964d7030879d37d9a302;p=PuTTY.git diff --git a/raw.c b/raw.c index 698d7e4f..a7fbbc5c 100644 --- a/raw.c +++ b/raw.c @@ -50,6 +50,7 @@ static void raw_log(Plug plug, int type, SockAddr addr, int port, msg = dupprintf("Failed to connect to %s: %s", addrbuf, error_msg); logevent(raw->frontend, msg); + sfree(msg); } static void raw_check_close(Raw raw) @@ -184,15 +185,10 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, sfree(*realhost); *realhost = dupstr(loghost); - colon = strrchr(*realhost, ':'); - if (colon) { - /* - * FIXME: if we ever update this aspect of ssh.c for - * IPv6 literal management, this should change in line - * with it. - */ + + colon = host_strrchr(*realhost, ':'); + if (colon) *colon++ = '\0'; - } } return NULL;