Replace malloc/memset with calloc.