X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fd66175e28ee5fd0ff15fa4b3439278e97a22712..f85e6f6edb2c9415bc10bd2015479d72ea8c5ae2:/rlogin.c diff --git a/rlogin.c b/rlogin.c index 455c2d9d..af3bd876 100644 --- a/rlogin.c +++ b/rlogin.c @@ -130,8 +130,10 @@ static const char *rlogin_init(void *frontend_handle, void **backend_handle, sfree(buf); } addr = name_lookup(host, port, realhost, cfg); - if ((err = sk_addr_error(addr)) != NULL) + if ((err = sk_addr_error(addr)) != NULL) { + sk_addr_free(addr); return err; + } if (port < 0) port = 513; /* default rlogin port */ @@ -151,8 +153,6 @@ static const char *rlogin_init(void *frontend_handle, void **backend_handle, if ((err = sk_socket_error(rlogin->s)) != NULL) return err; - sk_addr_free(addr); - /* * Send local username, remote username, terminal/speed */