]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - rlogin.c
Document /DNO_SECURITY compile option.
[PuTTY.git] / rlogin.c
index 3ae18089c1c1ae2516e819721fa5d4f517a35945..8010852710b7c48a84270be9e7aac1c135b1faa1 100644 (file)
--- a/rlogin.c
+++ b/rlogin.c
@@ -24,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);