X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6e1ebb76bc65c074b780b303a1f1550f5ae4dd3c..9954aaa37368a233dc614d610ca68c2ce5a7e8cd:/rlogin.c?ds=inline diff --git a/rlogin.c b/rlogin.c index 15448fc4..80108527 100644 --- a/rlogin.c +++ b/rlogin.c @@ -16,11 +16,6 @@ static Socket s = NULL; static void rlogin_size(void); -static int sb_opt, sb_len; -static char *sb_buf = NULL; -static int sb_size = 0; -#define SB_DELTA 1024 - static void c_write(char *buf, int len) { from_backend(0, buf, len); @@ -29,8 +24,10 @@ static void c_write(char *buf, int len) static int rlogin_closing(Plug plug, char *error_msg, int error_code, int calling_back) { - sk_close(s); - s = NULL; + if (s) { + sk_close(s); + s = NULL; + } if (error_msg) { /* A socket error has occurred. */ connection_fatal(error_msg);