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

Re: [PATCH] Support for exit-signal messages

From: Daniel Stenberg <daniel_at_haxx.se>
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
callback).

Thus it would need to be something like:

LIBSSH2_API void
libssh2_free(LIBSSH2_SESSION *session, void *ptr)
{
   LIBSSH2_FREE(session, ptr);
}

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-10-05