X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=d03de083ce0f6c7964636fd206ac187ba09bb53c;hb=e4712f729ddb540ea52faebd1312fcfe26773595;hp=270d76b0d972d7ec2c1997d4f4e338e27c4828f3;hpb=84c3ece865ffdc45fdb21759f5b3b832f601a3a3;p=PuTTY.git diff --git a/ssh.c b/ssh.c index 270d76b0..d03de083 100644 --- a/ssh.c +++ b/ssh.c @@ -1873,8 +1873,10 @@ static char *connect_to_host(char *host, int port, char **realhost, int nodelay) logevent(buf); } s = sk_new(addr, port, 0, 1, nodelay, &fn_table_ptr); - if ((err = sk_socket_error(s))) + if ((err = sk_socket_error(s))) { + s = NULL; return err; + } #ifdef FWHACK sk_write(s, "connect ", 8); @@ -2166,8 +2168,7 @@ static int do_ssh1_login(unsigned char *in, int inlen, int ispkt) break; case 3: case 4: - random_save_seed(); - exit(0); + cleanup_exit(0); break; default: if (((c >= ' ' && c <= '~') || @@ -2472,8 +2473,7 @@ static int do_ssh1_login(unsigned char *in, int inlen, int ispkt) break; case 3: case 4: - random_save_seed(); - exit(0); + cleanup_exit(0); break; default: if (pos < sizeof(password)-1) @@ -3971,8 +3971,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) break; case 3: case 4: - random_save_seed(); - exit(0); + cleanup_exit(0); break; default: if (((c >= ' ' && c <= '~') || @@ -4450,8 +4449,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) break; case 3: case 4: - random_save_seed(); - exit(0); + cleanup_exit(0); break; default: if (pos < sizeof(password)-1)