Change malloc to calloc

Reference: http://undeadly.org/cgi?action=article&sid=20060330071917