Signed-off-by: Marcin Slusarz <[email protected]>
---
 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);
 }
-- 
1.7.5.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to