summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-17 15:27:58 +1000
committerDave Airlie <[email protected]>2010-09-17 15:29:32 +1000
commitd0502297e02074d0b022c1e3e33319829b750a7e (patch)
tree6a935e14b7d5d37c5d9fa9dc9d0519b5cb721a8e /src/gallium/winsys
parent3ddc714b20ac4e28b80c6f88d1993445fff2262c (diff)
r600g: use calloc for ctx bo allocations
since the reference code relies on these being NULL.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_ctx.c2
1 files changed, 1 insertions, 1 deletions
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;