Salvador Fandiño 60874670ef agent_disconnect_unix: unset the agent fd after closing it
"agent_disconnect_unix", called by "libssh2_agent_disconnect", was
leaving the file descriptor in the agent structure unchanged. Later,
"libssh2_agent_free" would call again "libssh2_agent_disconnect" under
the hood and it would try to close again the same file descriptor. In
most cases that resulted in just a harmless error, but it is also
possible that the file descriptor had been reused between the two
calls resulting in the closing of an unrelated file descriptor.

This patch sets agent->fd to LIBSSH2_INVALID_SOCKET avoiding that
issue.

Signed-off-by: Salvador Fandiño <sfandino@yahoo.com>
2016-01-21 09:23:37 +01:00
2015-03-12 22:48:38 +00:00
2016-01-18 13:35:28 +01:00
2016-01-18 13:35:28 +01:00
2016-01-18 13:35:28 +01:00
2015-09-04 08:17:57 +02:00
2015-03-07 11:32:08 +01:00
2009-09-23 09:39:47 +02:00
2015-03-12 22:48:38 +00:00
2014-08-31 00:41:58 +02:00
2011-04-04 13:31:33 +02:00
2011-04-04 13:31:33 +02:00
2015-03-12 22:48:38 +00:00
2015-06-12 09:15:47 +02:00

libssh2 - SSH2 library
======================

libssh2 is a library implementing the SSH2 protocol, available under
the revised BSD license.

Web site: http://www.libssh2.org/

Mailing list: http://cool.haxx.se/mailman/listinfo/libssh2-devel

License: see COPYING

Source code: https://github.com/libssh2/libssh2

Web site source code: https://github.com/libssh2/www

Installation instructions are in:
 - docs/INSTALL_CMAKE for CMake
 - docs/INSTALL_AUTOTOOLS for Autotools
Description
No description provided
Readme 2.4 MiB
Languages
C 85.7%
M4 4%
Makefile 3.4%
Shell 2.8%
CMake 2.4%
Other 1.6%