From: Marcin Slusarz Date: Sun, 21 Oct 2012 22:20:32 +0000 (+0200) Subject: drm/nouveau: fix nouveau_mm/nouveau_mm_node leak X-Git-Tag: upstream/snapshot3+hdmi~6338^2~7^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92485cef52c2de0f98efdf527ea39cef2b9fc416;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drm/nouveau: fix nouveau_mm/nouveau_mm_node leak v2: use already existing parent Signed-off-by: Marcin Slusarz Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/core/gpuobj.c b/drivers/gpu/drm/nouveau/core/core/gpuobj.c index 1f34549..70586fd 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);