summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-01-29 09:41:21 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-01-29 09:41:21 +0900
commit93d727eea75812ecb21706804033a33d2e761eb8 (patch)
tree48eb4f38c5939461022ffee477072f29754702e8 /src/mesa/pipe/pipebuffer/pb_buffer_malloc.c
parentf3d0882c0218612a91a6feac91d23b34f6447d8e (diff)
gallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initiallized.
Diffstat (limited to 'src/mesa/pipe/pipebuffer/pb_buffer_malloc.c')
-rw-r--r--src/mesa/pipe/pipebuffer/pb_buffer_malloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c
index fc83a00f36..2151f1d691 100644
--- a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c
+++ b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c
@@ -107,10 +107,9 @@ pb_malloc_buffer_create(size_t size,
{
struct malloc_buffer *buf;
- /* TODO: accept an alignment parameter */
/* TODO: do a single allocation */
- buf = (struct malloc_buffer *)MALLOC(sizeof(struct malloc_buffer));
+ buf = CALLOC_STRUCT(malloc_buffer);
if(!buf)
return NULL;