[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1441963856-17465-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Fri, 11 Sep 2015 15:00:56 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: David Airlie <airlied@...ux.ie>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
daniel.vetter@...ll.ch,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] drm/nouveau: fix memory leak
If pm_runtime_get_sync() we were going to "out" but we missed freeing
vma.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 2c99815..c05b2f7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -84,8 +84,10 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
}
ret = pm_runtime_get_sync(dev);
- if (ret < 0 && ret != -EACCES)
+ if (ret < 0 && ret != -EACCES) {
+ kfree(vma);
goto out;
+ }
ret = nouveau_bo_vma_add(nvbo, cli->vm, vma);
if (ret)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists