From f4c4ca64a827661a392749a0684e59ba1556447e Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 9 May 2012 20:34:55 +0800 Subject: [PATCH] Initialise agent_fd to -1 so we don't end up closing stdin (fd 0) if public key authentication is disabled --- cli-runopts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cli-runopts.c b/cli-runopts.c index 3f18263..44d2b24 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -140,6 +140,7 @@ void cli_getopts(int argc, char ** argv) { #endif #ifdef ENABLE_CLI_AGENTFWD cli_opts.agent_fwd = 0; + cli_opts.agent_fd = -1; cli_opts.agent_keys_loaded = 0; #endif #ifdef ENABLE_CLI_PROXYCMD