Twas brillig at 00:05:21 10.01.2010 UTC+01 when daniel_at_haxx.se did gyre and gimble:
DS> 1 - aesthetics. I think calling the callback function to free something when
DS> we know there's nothing to free is useless.
OTOH, double-checking memory for NULL (one call outside of free(3) and
another one inside) is a bit slower.
DS> 2 - this triggered a problem in a debug setup of libssh2 that I use,
DS> that happen to have a trigger on free(NULL) to catch mistakes in the code
I'd call this setup broken, as lot of code relies on the fact free(NULL) = NOP.
-- http://fossarchy.blogspot.com/
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel