diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-06-23 14:34:30 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-26 23:20:12 (GMT) |
commit | 8fe198b2c6fd8455db9f07d712ee54e2a1d02783 (patch) | |
tree | 70d4a90686950d4a8941c4b274ad7f918518a078 /drivers/gpu/drm/nouveau/nouveau_gem.c | |
parent | 0de53a546b4f7056d1404e40320e57aad723621c (diff) | |
download | linux-fsl-qoriq-8fe198b2c6fd8455db9f07d712ee54e2a1d02783.tar.xz |
drm/nouveau: fix nouveau_vma object leak
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 0223937..5f0bc57 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -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); } |