id, glhd: Fix malloc/calloc of struct.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 23 Jun 2010 06:40:11 +0000 (23:40 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 23 Jun 2010 06:40:11 +0000 (23:40 -0700)
( >&)

src/gallium/drivers/galahad/glhd_objects.c
src/gallium/drivers/identity/id_objects.c

index 4682d717d8337949fb0aa659db733445eba80dec..c9680d13e1509b0cf75ecfcc9b672829ee4bd431 100644 (file)
@@ -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;
index 82d06e7f6055abebb0a31ae1e0baf5e03868a010..cd364a2bc0c0f5ae5fe186610ad1200eb524f245 100644 (file)
@@ -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;