bugfix: double free
use skynet.error instead of print
freebsd can use malloc hook now