Skip to content

Commit

Permalink
drm/nouveau: fix nouveau_mm/nouveau_mm_node leak
Browse files Browse the repository at this point in the history
v2: use already existing parent

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Oct 22, 2012
1 parent 90e2889 commit 92485ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/nouveau/core/core/gpuobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 92485ce

Please sign in to comment.