This patch treats remaining non-checked mallocs. And changes to calloc in places where it makes sense