Skip to content

Commit

Permalink
drm/nouveau: fix nouveau_vma object leak
Browse files Browse the repository at this point in the history
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 Jun 26, 2011
1 parent 0de53a5 commit 8fe198b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)

vma = nouveau_bo_vma_find(nvbo, fpriv->vm);
if (vma) {
if (--vma->refcount == 0)
if (--vma->refcount == 0) {
nouveau_bo_vma_del(nvbo, vma);
kfree(vma);
}
}
ttm_bo_unreserve(&nvbo->bo);
}
Expand Down

0 comments on commit 8fe198b

Please sign in to comment.