Initialise agent_fd to -1 so we don't end up closing stdin (fd 0)

if public key authentication is disabled
This commit is contained in:
Matt Johnston 2012-05-09 20:34:55 +08:00
parent 2a02c4084a
commit f4c4ca64a8

View File

@ -140,6 +140,7 @@ void cli_getopts(int argc, char ** argv) {
#endif #endif
#ifdef ENABLE_CLI_AGENTFWD #ifdef ENABLE_CLI_AGENTFWD
cli_opts.agent_fwd = 0; cli_opts.agent_fwd = 0;
cli_opts.agent_fd = -1;
cli_opts.agent_keys_loaded = 0; cli_opts.agent_keys_loaded = 0;
#endif #endif
#ifdef ENABLE_CLI_PROXYCMD #ifdef ENABLE_CLI_PROXYCMD