summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-07-05 15:45:49 -0700
committerEric Anholt <eric@anholt.net>2007-07-05 15:45:49 -0700
commitf7643b96e9e526a7610dec51650546e4b916ccd2 (patch)
treecb657dc1de9bc550993aed85509ac6085cb55337 /src/mesa/drivers
parent23e0ca2ebb0d123c7a40bb8b3687adb407c95504 (diff)
bufmgr_fake: Keep the bufmgr lock held while freeing a block.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr_fake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
index e08b5b3c7f..003ac49f3b 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
+++ b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
@@ -632,11 +632,11 @@ dri_fake_bo_unreference(dri_bo *bo)
_glthread_LOCK_MUTEX(bufmgr_fake->mutex);
if (--bo_fake->refcount == 0) {
- _glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
/* No remaining references, so free it */
if (bo_fake->block)
free_block(bufmgr_fake, bo_fake->block);
free_backing_store(bo);
+ _glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
free(bo);
return;
}