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 <imirkin@alum.mit.edu>
This commit is contained in:
Laura Ekstrand
2015-04-01 11:18:32 -07:00
parent 3321724c10
commit 142909f19d
+1
View File
@@ -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;
}
}