mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-21 06:36:38 -05:00
drm/nouveau: fix nouveau_vma object leak
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
committed by
Ben Skeggs
parent
0de53a546b
commit
8fe198b2c6
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user