summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-07-05 15:45:49 -0700
committerEric Anholt <[email protected]>2007-07-05 15:45:49 -0700
commitf7643b96e9e526a7610dec51650546e4b916ccd2 (patch)
treecb657dc1de9bc550993aed85509ac6085cb55337 /src/mesa
parent23e0ca2ebb0d123c7a40bb8b3687adb407c95504 (diff)
bufmgr_fake: Keep the bufmgr lock held while freeing a block.
Diffstat (limited to 'src/mesa')
-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 e08b5b3c7fb..003ac49f3b4 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;
}