mesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib()
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 5 Sep 2008 14:06:59 +0000 (08:06 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 5 Sep 2008 14:06:59 +0000 (08:06 -0600)
src/mesa/main/attrib.c

index 94475b981dd9aca135d91fb501ca7b488151c53f..59babeb47bf9f4f9a982ff2ce58a14a39a119f39 100644 (file)
@@ -1330,7 +1330,7 @@ _mesa_PushClientAttrib(GLbitfield mask)
       newnode->next = head;
       head = newnode;
       /* unpacking attribs */
-      attr = MALLOC_STRUCT( gl_pixelstore_attrib );
+      attr = CALLOC_STRUCT( gl_pixelstore_attrib );
       copy_pixelstore(ctx, attr, &ctx->Unpack);
       newnode = new_attrib_node( GL_CLIENT_UNPACK_BIT );
       newnode->data = attr;