[Nouveau] [PATCH 2/2] nouveau/exa: Fix transfer bo memory leak
Maarten Maathuis
madman2003 at gmail.com
Mon Jun 18 15:29:00 PDT 2012
Thanks to "Christoph Bumiller <e0425955 at student.tuwien.ac.at>" for hinting at the cause of the problem.
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
src/nouveau_exa.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index c51a799..bb946b6 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -185,6 +185,8 @@ nouveau_exa_scratch(NVPtr pNv, int size, struct nouveau_bo **pbo, int *off)
}
nouveau_bo_ref(bo, &pNv->transfer);
+ /* Lower the refcount of the bo back to 1, otherwise it will never be freed. */
+ nouveau_bo_ref(NULL, &bo);
pNv->transfer_offset = 0;
}
--
1.7.8.6
More information about the Nouveau
mailing list