Mesa (master): r600g: use calloc for ctx bo allocations
Dave Airlie
airlied at kemper.freedesktop.org
Fri Sep 17 05:31:20 UTC 2010
Module: Mesa
Branch: master
Commit: d0502297e02074d0b022c1e3e33319829b750a7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0502297e02074d0b022c1e3e33319829b750a7e
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Sep 17 15:27:58 2010 +1000
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 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 ca3e40f..7ccb524 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;
More information about the mesa-commit
mailing list