bufmgr_fake: Keep the bufmgr lock held while freeing a block.

This commit is contained in:
Eric Anholt 2007-07-05 15:45:49 -07:00
parent 23e0ca2ebb
commit f7643b96e9

View file

@ -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;
}