summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-04-01 11:18:32 -0700
committerLaura Ekstrand <[email protected]>2015-04-01 12:07:28 -0700
commit142909f19ddeae7237acbb98b47e9228533e58f0 (patch)
treebf073f42194cdb2444a923e9219251f59ca57915
parent3321724c10e2c9c5cd8f84bafb26678c6d1108b5 (diff)
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 <[email protected]>
-rw-r--r--src/mesa/main/bufferobj.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}