Subject: Re: [libssh2] #182: Various memory leaks

Re: [libssh2] #182: Various memory leaks

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Fri, 25 Jun 2010 13:48:14 -0000

#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 stuge):

 Thanks for doing this research. Personally I believe that the issues
 within libssh2 are too fundamental to be easily fixable with only a few
 added if statements.

 Please create a patch using git, against the latest version of the
 codebase. Grab the code
 {{{
 git clone git://git.libssh2.org/libssh2.git
 }}}
 then make your changes, and create a commit
 {{{
 git commit
 }}}
 and finally turn your commit into a patch file
 {{{
 git format-patch -1
 }}}
 Attaching that patch to this ticket makes it a lot easier for others to
 test your changes.

 I see a couple of issues with the suggested changes. In particular, 0
 bytes transferred is often OK within libssh2, and assuming that all socket
 operations are restricted to always having the same errors may not be a
 good idea and finally it's not acceptable to require a second call to any
 function after a failure for internal state to get updated properly.

 I'm afraid that fixing this issue properly will need fairly invasive
 changes => it'll take time to get done.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/182#comment:6>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-25