From edd4e662224034b394d7d33a6689c4aae2ff97d8 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 16 May 2005 14:41:08 +0000 Subject: [PATCH] connection_fatal() should be called after ssh_closing() and other accesses to `ssh', since it potentially frees it and potentially doesn't return. Only affected a couple of rare circumstances. git-svn-id: svn://svn.tartarus.org/sgt/putty@5787 cda61777-01e9-0310-a592-d414129be87e --- ssh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssh.c b/ssh.c index 69972e49..605e0e6f 100644 --- a/ssh.c +++ b/ssh.c @@ -3514,9 +3514,9 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen, PKT_STR, "No more passwords available to try", PKT_END); logevent("Unable to authenticate"); - connection_fatal(ssh->frontend, "Unable to authenticate"); ssh->close_expected = TRUE; - ssh_closing((Plug)ssh, NULL, 0, 0); + ssh_closing((Plug)ssh, NULL, 0, 0); + connection_fatal(ssh->frontend, "Unable to authenticate"); crStop(1); } } else { @@ -6137,9 +6137,9 @@ static void ssh2_msg_channel_request(Ssh ssh, struct Packet *pktin) ssh2_pkt_addstring(pktout, buf); ssh2_pkt_addstring(pktout, "en"); /* language tag */ ssh2_pkt_send_noqueue(ssh, pktout); - connection_fatal(ssh->frontend, "%s", buf); ssh->close_expected = TRUE; ssh_closing((Plug)ssh, NULL, 0, 0); + connection_fatal(ssh->frontend, "%s", buf); return; } @@ -7108,10 +7108,10 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, ssh2_pkt_addstring(s->pktout, "en"); /* language tag */ ssh2_pkt_send_noqueue(ssh, s->pktout); logevent("Unable to authenticate"); + ssh->close_expected = TRUE; + ssh_closing((Plug)ssh, NULL, 0, 0); connection_fatal(ssh->frontend, "Unable to authenticate"); - ssh->close_expected = TRUE; - ssh_closing((Plug)ssh, NULL, 0, 0); crStopV; } } else { -- 2.11.0