From: Dave Airlie Date: Fri, 17 Sep 2010 05:27:58 +0000 (+1000) Subject: r600g: use calloc for ctx bo allocations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0502297e02074d0b022c1e3e33319829b750a7e;p=mesa.git r600g: use calloc for ctx bo allocations since the reference code relies on these being NULL. --- 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;