Subject: Re: memory leak in _libssh2_channel_open

Re: memory leak in _libssh2_channel_open

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 25 Feb 2012 22:25:26 +0100 (CET)

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!

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

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