On Sun, 10 Jan 2010, Mikhail Gusarov wrote:
> l> + if(pubkeydata)
> l> + LIBSSH2_FREE(session, pubkeydata);
>
> Why it's needed?
>
> From man free(3): "If ptr is NULL, no operation is performed."
It isn't strictly needed.
I want it for two reasons:
1 - aesthetics. I think calling the callback function to free something when
we know there's nothing to free is useless.
2 - this triggered a problem in a debug setup of libssh2 that I use,
that happen to have a trigger on free(NULL) to catch mistakes in the code
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-01-10