Mesa (master): id, glhd: Fix malloc/calloc of struct.
Corbin Simpson
csimpson at kemper.freedesktop.org
Wed Jun 23 07:12:51 UTC 2010
Module: Mesa
Branch: master
Commit: ee2c6d748de170e0ffc30bb4a8366526a1a25f65
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee2c6d748de170e0ffc30bb4a8366526a1a25f65
Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date: Tue Jun 22 23:40:11 2010 -0700
id, glhd: Fix malloc/calloc of struct.
( >&)
---
src/gallium/drivers/galahad/glhd_objects.c | 2 +-
src/gallium/drivers/identity/id_objects.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/galahad/glhd_objects.c b/src/gallium/drivers/galahad/glhd_objects.c
index 4682d71..c9680d1 100644
--- a/src/gallium/drivers/galahad/glhd_objects.c
+++ b/src/gallium/drivers/galahad/glhd_objects.c
@@ -120,7 +120,7 @@ galahad_sampler_view_create(struct galahad_context *glhd_context,
assert(view->texture == glhd_resource->resource);
- glhd_view = MALLOC(sizeof(struct galahad_sampler_view));
+ glhd_view = CALLOC_STRUCT(galahad_sampler_view);
glhd_view->base = *view;
glhd_view->base.reference.count = 1;
diff --git a/src/gallium/drivers/identity/id_objects.c b/src/gallium/drivers/identity/id_objects.c
index 82d06e7..cd364a2 100644
--- a/src/gallium/drivers/identity/id_objects.c
+++ b/src/gallium/drivers/identity/id_objects.c
@@ -120,7 +120,7 @@ identity_sampler_view_create(struct identity_context *id_context,
assert(view->texture == id_resource->resource);
- id_view = MALLOC(sizeof(struct identity_sampler_view));
+ id_view = CALLOC_STRUCT(identity_sampler_view);
id_view->base = *view;
id_view->base.reference.count = 1;
More information about the mesa-commit
mailing list