Simon Josefsson <simon_at_josefsson.org> writes:
> Daniel Stenberg <daniel_at_haxx.se> writes:
>
>> 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).
>
> Yeah, I thought about that, but kind of preferred the other way around
> to avoid the LIBSSH2_SESSION dependency. But I guess the library is
> already too deeply married into the LIBSSH2_SESSION parameter anyway
> that it doesn't make any sense to try and avoid it here. I can prepare
> an updated patch tomorrow..
I have pushed the patch below. I now realize there should be a man page
too, will add it next...
/Simon
Received on 2010-10-13