Subject: Re: sftp functions leaking memory?

Re: sftp functions leaking memory?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 18 May 2012 22:55:58 +0200 (CEST)

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
Received on 2012-05-18