Fix incorrect malloc