libssh2_agent_init: init ->fd to LIBSSH2_INVALID_SOCKET

... previously it was left at 0 which is a valid file descriptor!

Bug: https://trac.libssh2.org/ticket/265

Fixes #265
This commit is contained in:
Matthias Kerestesch 2013-05-18 23:01:35 +02:00 committed by Daniel Stenberg
parent d7f9cd57c5
commit 1ad20ac7d3

View File

@ -652,6 +652,7 @@ libssh2_agent_init(LIBSSH2_SESSION *session)
return NULL;
}
memset(agent, 0, sizeof *agent);
agent->fd = LIBSSH2_INVALID_SOCKET;
agent->session = session;
_libssh2_list_init(&agent->head);