X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=raw.c;h=86fd5315cd282ddb4644e4b80668607c5a6d8331;hb=fb46f1b77dec7259c7e383db0f36252b8f393649;hp=04686f34c407b961219f44571c38c0490e2efe5e;hpb=c2eb57a034f4e6785656497be54d7f1d89fad1ad;p=PuTTY.git diff --git a/raw.c b/raw.c index 04686f34..86fd5315 100644 --- a/raw.c +++ b/raw.c @@ -15,11 +15,6 @@ static Socket s = NULL; static void raw_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); @@ -28,8 +23,10 @@ static void c_write(char *buf, int len) static int raw_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);