From 142909f19ddeae7237acbb98b47e9228533e58f0 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Wed, 1 Apr 2015 11:18:32 -0700 Subject: 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 --- src/mesa/main/bufferobj.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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; } } -- cgit v1.2.3