Subject: Re: memory leak in _libssh2_channel_open

Re: memory leak in _libssh2_channel_open

From: Steven Dake <sdake_at_redhat.com>
Date: Sun, 26 Feb 2012 11:10:44 -0700

On 02/25/2012 02:25 PM, Daniel Stenberg wrote:
> On Sat, 25 Feb 2012, Steven Dake wrote:
>
>> So it appears the packets are still present on the session list but
>> somehow dropped by the open call and not removed.
>>
>> If you have other suggestions for getting to the root cause please let
>> me know. I am happy to help.
>
> My suspicion is that the call to _libssh2_list_add() within the
> src/packet.c:_libssh2_packet_add() function is what adds the packet to
> the incoming queue of packets, and some packets that arrive are never
> yanked off that list.
>
> If you would add some debug code that would count the length of that
> linked list and logged it occasionally we could see if that is true. The
> list should really only grow temporarily and then go back to almost
> nothing. If that turns out to be true, we then of course need to figure
> out what packets that are lingering there and how to stop them from
> doing it!

Thanks for the tip. I'll see if I can instrument this code as you
suggested and determine which packet id is pending on the list if the
list doesn't go to zero.

Enjoy your vacation

Regards
-steve

>
> (BTW, I'll be away on a week's vacation starting tomorrow so I might not
> respond very quickly until I get back.)
>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-26