Replace malloc and memset calls with a single calloc call.