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

index 4cbb0273ab6e8ef378775179f296dda42c84647d..7179fba3db32c43c0b309d8bbeb435b4e5b6cb0e 100644 (file)
@@ -1325,7 +1325,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;