unlock mutex upon error return (Jeff Muizelaar)
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 12 Feb 2005 18:43:38 +0000 (18:43 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 12 Feb 2005 18:43:38 +0000 (18:43 +0000)
src/mesa/main/bufferobj.c
src/mesa/main/texobj.c

index 3ca08859a7418ef2db2cdad66c18ad394b07055c..3629ffef879c726f8b92b4dcc371ff5c31061925 100644 (file)
@@ -689,6 +689,7 @@ _mesa_GenBuffersARB(GLsizei n, GLuint *buffer)
       GLenum target = 0;
       bufObj = (*ctx->Driver.NewBufferObject)( ctx, name, target );
       if (!bufObj) {
+         _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenBuffersARB");
          return;
       }
index e6e39d4b434754f846e53205dc2baa45ed482c53..488edab8725af070b46c6f361ec8d80d47910e33 100644 (file)
@@ -565,6 +565,7 @@ _mesa_GenTextures( GLsizei n, GLuint *textures )
       GLenum target = 0;
       texObj = (*ctx->Driver.NewTextureObject)( ctx, name, target);
       if (!texObj) {
+         _glthread_UNLOCK_MUTEX(GenTexturesLock);
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTextures");
          return;
       }