Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / glx / clientattrib.c
index 7792fa31f9d41233f040431f58b87b8f9e9fc719..37f14c541a5e81ce196b336acbbec8b759cba563 100644 (file)
@@ -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;