Ugh, that was the problem.
In addition, I see that libssh2_session_free can also return
LIBSSH2_ERROR_EAGAIN. I've just reviewed the code, added the spins,
and I'm testing it. The heap seems to be almost stable now, we will
see what happens in a couple of hours.
Thank you (all) very much for your help.
:)
Marta.
2012/5/18 Daniel Stenberg <daniel_at_haxx.se>:
> On Fri, 18 May 2012, Marta wrote:
>
>> I reviewed my code, and having not found any error
>
>
> I nailed two flaws in the test code. When fixed, I can't spot any leaks
> anymore...
>
> Both libssh2_sftp_close() and libssh2_sftp_shutdown() can return
> LIBSSH2_ERROR_EAGAIN when using non-blocking and when you don't call them
> again then, they haven't completed their operations and they risk leaking
> memory.
>
>
> --
>
> / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-21