Subject: Re: Memory leak on mac

Re: Memory leak on mac

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Wed, 17 Feb 2016 16:47:44 +0100

On Wednesday, February 17, 2016 16:04:06 Velichko Yuriy wrote:
> In the attached archive an example based on libssh2 docs:
>
> http://www.libssh2.org/examples/tcpip-forward.html
>
> In the attached code the port forwarding is implemented. In the infinity
> loop we preforms port forwarding of the PostgreSQL port on the remote
> computer. In the end of the loop all resources are freeing.
>
> But memory increases constantly.
>
> I think that I'm doing something wrong. Tell me please what exactly? )

Your code does not seem to handle LIBSSH2_ERROR_EAGAIN coming out
of libssh2_channel_free() and libssh2_session_free(). It should.

Kamil
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-02-17