From: Laura Ekstrand Date: Wed, 1 Apr 2015 18:18:32 +0000 (-0700) Subject: main: create_buffers unlocks mutex when throwing OUT_OF_MEMORY. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=142909f19ddeae7237acbb98b47e9228533e58f0;p=mesa.git main: create_buffers unlocks mutex when throwing OUT_OF_MEMORY. Ilia Mirkin found that I had forgotten to free the mutex in the error case. Reviewed-by: Ilia Mirkin --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c45cec405a0..66dee680258 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1333,6 +1333,7 @@ create_buffers(GLsizei n, GLuint *buffers, bool dsa) buf = ctx->Driver.NewBufferObject(ctx, buffers[i]); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func); + mtx_unlock(&ctx->Shared->Mutex); return; } }