Subject: Re: memory leak in _libssh2_channel_open

Re: memory leak in _libssh2_channel_open

From: Peter Stuge <>
Date: Sat, 25 Feb 2012 20:17:39 +0100

Steven Dake wrote:
> After adding the sigint handler, letting my app run for 12 hours, then
> ctrl-c the app inside valgrind, the leaks are collected by the sigint
> handler.
> My sigint handler frees any open channels at the time via
> libssh2_channel_free() and frees any open sessions| via
> libssh2_session_free().

Please try without calling _session_free() so that we can test the

> So it appears the packets are still present on the session list but
> somehow dropped by the open call and not removed.


Received on 2012-02-25