www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: sftp functions leaking memory?

Re: sftp functions leaking memory?

From: Marta <marta.m.batlle_at_gmail.com>
Date: Mon, 21 May 2012 10:03:52 +0200

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.



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

the libssh2 team