]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - ssh.c
Make kh2reg.py compatible with modern Python.
[PuTTY.git] / ssh.c
diff --git a/ssh.c b/ssh.c
index 093c40ec5cd8050160318e475283dd33fc41fff9..a7f5882f7dff2f87319578f8c559a884174e53cc 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3867,6 +3867,7 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
         s->dlgret = verify_ssh_manual_host_key(ssh, fingerprint, NULL, NULL);
         if (s->dlgret == 0) {          /* did not match */
             bombout(("Host key did not appear in manually configured list"));
+            sfree(keystr);
             crStop(0);
         } else if (s->dlgret < 0) { /* none configured; use standard handling */
             ssh_set_frozen(ssh, 1);
@@ -3893,6 +3894,8 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
                                NULL, 0, TRUE);
                 crStop(0);
             }
+        } else {
+            sfree(keystr);
         }
     }
 
@@ -10595,6 +10598,8 @@ static const char *ssh_init(void *frontend_handle, void **backend_handle,
     ssh->sent_console_eof = FALSE;
     ssh->got_pty = FALSE;
     ssh->bare_connection = FALSE;
+    ssh->X11_fwd_enabled = FALSE;
+    ssh->connshare = NULL;
     ssh->attempting_connshare = FALSE;
 
     *backend_handle = ssh;