X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fglx%2Fclientattrib.c;h=37f14c541a5e81ce196b336acbbec8b759cba563;hp=1b306eab120a4fd50f3138c4e41a97192a575320;hb=a999798daad7181110922a7e756eb1d8dfe55c4e;hpb=2b7a972e3f36bfcdc6fbe2b59d7ffdcde49c9405 diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c index 1b306eab120..37f14c541a5 100644 --- a/src/glx/clientattrib.c +++ b/src/glx/clientattrib.c @@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask) if (spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) { if (!(sp = *spp)) { sp = malloc(sizeof(__GLXattribute)); + if (sp == NULL) { + __glXSetError(gc, GL_OUT_OF_MEMORY); + return; + } *spp = sp; } sp->mask = mask;