summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2012-10-22 00:20:32 +0200
committerBen Skeggs <bskeggs@redhat.com>2012-10-22 04:25:53 +0200
commit92485cef52c2de0f98efdf527ea39cef2b9fc416 (patch)
tree728d70de0b7beeb741baa993c112c2799a1ccd0e /drivers
parentdrm/nouveau/bios: improve error handling when reading the vbios from ACPI (diff)
downloadlinux-92485cef52c2de0f98efdf527ea39cef2b9fc416.tar.xz
linux-92485cef52c2de0f98efdf527ea39cef2b9fc416.zip
drm/nouveau: fix nouveau_mm/nouveau_mm_node leak
v2: use already existing parent Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/core/core/gpuobj.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/gpuobj.c b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
index 1f34549aff18..70586fde69cf 100644
--- a/drivers/gpu/drm/nouveau/core/core/gpuobj.c
+++ b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
@@ -39,6 +39,11 @@ nouveau_gpuobj_destroy(struct nouveau_gpuobj *gpuobj)
nv_wo32(gpuobj, i, 0x00000000);
}
+ if (gpuobj->node) {
+ nouveau_mm_free(&nv_gpuobj(gpuobj->parent)->heap,
+ &gpuobj->node);
+ }
+
if (gpuobj->heap.block_size)
nouveau_mm_fini(&gpuobj->heap);