diff --git a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c index 9bf3f34..091604e 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c +++ b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c @@ -676,8 +676,10 @@ dri_fake_bo_unreference(dri_bo *bo) free_block(bufmgr_fake, bo_fake->block); free_backing_store(bo); + // Unreference all the target buffers for (i = 0; i < bo_fake->nr_relocs; i++) dri_bo_unreference(bo_fake->relocs[i].target_buf); + free(bo_fake->relocs); DBG("drm_bo_unreference: free buf %d %s\n", bo_fake->id, bo_fake->name);