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

Reply via email to