Skip to contentSkip to conversation

drm/nouveau: fix nouveau_vma object leak

PATCH New Marcin Slusarz 1 participant 1 message Jun 23, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: fix nouveau_vma object leak

---
 drivers/gpu/drm/nouveau/nouveau_gem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +3 -1
index 0223937..5f0bc57 100644
@@ -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);
 }
Signature · 1 line
1.7.5.3