X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ssh.c;h=d395d7b5c556e72347a814cd2c8509eed27c1aa1;hb=cc66c86e7311c97db09da989c340ba3108c9e14f;hp=57ee2e8acd6d387d9070194e597ad67224233bfe;hpb=70ab076d839072357dab75590287d44961302de8;p=PuTTY.git diff --git a/ssh.c b/ssh.c index 57ee2e8a..d395d7b5 100644 --- a/ssh.c +++ b/ssh.c @@ -10625,11 +10625,13 @@ static const char *ssh_init(void *frontend_handle, void **backend_handle, ssh->gsslibs = NULL; #endif + random_ref(); /* do this now - may be needed by sharing setup code */ + p = connect_to_host(ssh, host, port, realhost, nodelay, keepalive); - if (p != NULL) + if (p != NULL) { + random_unref(); return p; - - random_ref(); + } return NULL; }