From f7643b96e9e526a7610dec51650546e4b916ccd2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 5 Jul 2007 15:45:49 -0700 Subject: [PATCH] bufmgr_fake: Keep the bufmgr lock held while freeing a block. --- src/mesa/drivers/dri/common/dri_bufmgr_fake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2