Subject: Re: [PATCH] Support for exit-signal messages

Re: [PATCH] Support for exit-signal messages

From: Daniel Stenberg <>
Date: Tue, 5 Oct 2010 19:50:54 +0200 (CEST)

On Tue, 5 Oct 2010, Simon Josefsson wrote:

> +LIBSSH2_API void
> +libssh2_free(void *ptr)
> +{
> + free (ptr);
> +}

I think it's too simple. For example, to be able to free the memory returned
by libssh2_base64_decode() it would have to use the internal LIBSSH2_FREE()
call which needs the session pointer (and will then use the correct free

Thus it would need to be something like:

libssh2_free(LIBSSH2_SESSION *session, void *ptr)
   LIBSSH2_FREE(session, ptr);

Received on 2010-10-05