From: Eric Anholt Date: Thu, 5 Jul 2007 22:45:49 +0000 (-0700) Subject: bufmgr_fake: Keep the bufmgr lock held while freeing a block. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7643b96e9e526a7610dec51650546e4b916ccd2;p=mesa.git bufmgr_fake: Keep the bufmgr lock held while freeing a block. --- 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; }