mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
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:
committed by
Daniel Stenberg
parent
d7f9cd57c5
commit
1ad20ac7d3
@@ -652,6 +652,7 @@ libssh2_agent_init(LIBSSH2_SESSION *session)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memset(agent, 0, sizeof *agent);
|
memset(agent, 0, sizeof *agent);
|
||||||
|
agent->fd = LIBSSH2_INVALID_SOCKET;
|
||||||
agent->session = session;
|
agent->session = session;
|
||||||
_libssh2_list_init(&agent->head);
|
_libssh2_list_init(&agent->head);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user