X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fclientattrib.c;h=37f14c541a5e81ce196b336acbbec8b759cba563;hb=311c82e1923f63070b198881d90c1098f4ff7a08;hp=7792fa31f9d41233f040431f58b87b8f9e9fc719;hpb=1218430e1200a08cd64b6555d3fd1fd0274ad9e5;p=mesa.git diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c index 7792fa31f9d..37f14c541a5 100644 --- a/src/glx/clientattrib.c +++ b/src/glx/clientattrib.c @@ -75,7 +75,11 @@ __indirect_glPushClientAttrib(GLuint mask) if (spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) { if (!(sp = *spp)) { - sp = (__GLXattribute *) Xmalloc(sizeof(__GLXattribute)); + sp = malloc(sizeof(__GLXattribute)); + if (sp == NULL) { + __glXSetError(gc, GL_OUT_OF_MEMORY); + return; + } *spp = sp; } sp->mask = mask; @@ -135,7 +139,7 @@ __glFreeAttributeState(struct glx_context * gc) spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; spp++) { sp = *spp; if (sp) { - XFree((char *) sp); + free((char *) sp); } else { break;