summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2009-03-19 23:59:42 +0100
committerMaarten Maathuis <madman2003@gmail.com>2009-03-20 00:02:12 +0100
commit00d8e960ca665b7f0528438331f4d0ae77fbb4cc (patch)
treef878f1531777100bc65f3f4c31e1c17afe6ca492
parent6169e3a6012d55522fc8028a5674891a5a99d935 (diff)
libdrm/nouveau: unref fences when deleting bo
- This was causing a significant memory leak.
-rw-r--r--libdrm/nouveau/nouveau_bo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdrm/nouveau/nouveau_bo.c b/libdrm/nouveau/nouveau_bo.c
index e8232ef2..860efa14 100644
--- a/libdrm/nouveau/nouveau_bo.c
+++ b/libdrm/nouveau/nouveau_bo.c
@@ -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);
}