From d0502297e02074d0b022c1e3e33319829b750a7e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 17 Sep 2010 15:27:58 +1000 Subject: [PATCH] r600g: use calloc for ctx bo allocations since the reference code relies on these being NULL. --- src/gallium/winsys/r600/drm/radeon_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/r600/drm/radeon_ctx.c b/src/gallium/winsys/r600/drm/radeon_ctx.c index ca3e40ffdc1..7ccb5245905 100644 --- a/src/gallium/winsys/r600/drm/radeon_ctx.c +++ b/src/gallium/winsys/r600/drm/radeon_ctx.c @@ -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;