libdrm/nouveau: unref fences when deleting bo

- This was causing a significant memory leak.
main
Maarten Maathuis 2009-03-19 23:59:42 +01:00
parent 6169e3a601
commit 00d8e960ca
1 changed files with 4 additions and 0 deletions

View File

@ -413,6 +413,10 @@ nouveau_bo_del_cb(void *priv)
{
struct nouveau_bo_priv *nvbo = priv;
if (nvbo->fence)
nouveau_fence_ref(NULL, &nvbo->fence);
if (nvbo->wr_fence)
nouveau_fence_ref(NULL, &nvbo->wr_fence);
nouveau_bo_kfree(nvbo);
free(nvbo);
}