r600g: use calloc for ctx bo allocations

since the reference code relies on these being NULL.
This commit is contained in:
Dave Airlie 2010-09-17 15:27:58 +10:00
parent 3ddc714b20
commit d0502297e0
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ struct radeon_ctx *radeon_ctx_init(struct radeon *radeon)
radeon_ctx_fini(ctx);
return NULL;
}
ctx->bo = malloc(sizeof(void *) * RADEON_CTX_MAX_PM4);
ctx->bo = calloc(sizeof(void *), RADEON_CTX_MAX_PM4);
if (ctx->bo == NULL) {
radeon_ctx_fini(ctx);
return NULL;