mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
unlock mutex before freeing data (caught w/ valgrind)
This commit is contained in:
parent
7b7c54e94c
commit
fbd147c0b5
1 changed files with 2 additions and 2 deletions
|
|
@ -1036,10 +1036,10 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
|
|||
if (oldFb && oldFb->Name != 0) {
|
||||
_glthread_LOCK_MUTEX(oldFb->Mutex);
|
||||
oldFb->RefCount--;
|
||||
_glthread_UNLOCK_MUTEX(oldFb->Mutex);
|
||||
if (oldFb->RefCount == 0) {
|
||||
oldFb->Delete(oldFb);
|
||||
}
|
||||
_glthread_UNLOCK_MUTEX(oldFb->Mutex);
|
||||
}
|
||||
ctx->ReadBuffer = newFb;
|
||||
}
|
||||
|
|
@ -1102,10 +1102,10 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
|
|||
*/
|
||||
_glthread_LOCK_MUTEX(fb->Mutex);
|
||||
fb->RefCount--;
|
||||
_glthread_UNLOCK_MUTEX(fb->Mutex);
|
||||
if (fb->RefCount == 0) {
|
||||
fb->Delete(fb);
|
||||
}
|
||||
_glthread_UNLOCK_MUTEX(fb->Mutex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue