summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c3
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index d04ac2f9f1c..e83aae0bba5 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -94,6 +94,9 @@ nouveau_buffer_destroy(struct pipe_screen *pscreen,
if (res->data && !(res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
FREE(res->data);
+ nouveau_fence_ref(NULL, &res->fence);
+ nouveau_fence_ref(NULL, &res->fence_wr);
+
FREE(res);
}
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index bfadbc5ab28..5ba8cf80331 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -116,6 +116,9 @@ nv50_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt)
nouveau_bo_ref(NULL, &mt->base.bo);
+ nouveau_fence_ref(NULL, &mt->base.fence);
+ nouveau_fence_ref(NULL, &mt->base.fence_wr);
+
FREE(mt);
}