Subject: Re: memory leak in _libssh2_channel_open

Re: memory leak in _libssh2_channel_open

From: Peter Stuge <>
Date: Fri, 24 Feb 2012 19:18:16 +0100


Steven Dake wrote:
> >> I tried this patch and it resulted in double free followed by
> >> segfault from gcc memory checker.
> >
> > Does valgrind tell where the packet was previously freed?
> >
> > And when does the double free happen?
> I have attached a gz of the typescript run of valgrind
> All sorts of bad things happen with that patch (those problems
> didn't occur prior to patch)

Yes. Looking a little closer the change is too naive. I don't like
this code at all. :(

Could you revert the patch and find out if the leak is from data
transfer or from channel create/free?

Received on 2012-02-24