#182: Various memory leaks
-------------------------------+--------------------------------------------
Reporter: john@… | Owner: bagder
Type: defect | Status: assigned
Priority: normal | Milestone: 1.2.6
Component: API | Version: 1.2.6
Resolution: | Keywords:
Blocks: | Blocked By:
-------------------------------+--------------------------------------------
Comment (by bagder):
I know about EINTR, so my question wasn't about that. I would suggest a
much smaller fix that also covers other problems that would risk having
the same blocking effect:
{{{
--- a/src/channel.c
+++ b/src/channel.c
@@ -2387,10 +2387,9 @@ int _libssh2_channel_free(LIBSSH2_CHANNEL *channel)
if(rc == LIBSSH2_ERROR_EAGAIN)
return rc;
- else if (rc < 0) {
- channel->free_state = libssh2_NB_state_idle;
- return rc;
- }
+
+ /* ignore all other errors as they otherwise risk blocking the
channel
+ free from happening */
}
channel->free_state = libssh2_NB_state_idle;
}}}
I've fixed the libssh2_publickey_list_free compiler warning in git now. It
was not meant to return any value since it is void. I just hadn't noticed
the warning.
-- Ticket URL: <http://trac.libssh2.org/ticket/182#comment:12> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-06-30