diff mbox

fix memory leak

Message ID 1397077891-24443-1-git-send-email-richert@braincorporation.com (mailing list archive)
State Accepted
Headers show

Commit Message

Micah Richert April 9, 2014, 9:11 p.m. UTC
Signed-off-by: Micah Richert <richert@braincorporation.com>
---
 drivers/gpu/drm/msm/msm_gem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Rafał Miłecki April 10, 2014, 4:49 a.m. UTC | #1
Please re-send this patch with a correct commit message (subject). Add
at least "drm: " prefix to it.

2014-04-09 23:11 GMT+02:00 Micah Richert <richert@braincorporation.com>:
>         Signed-off-by: Micah Richert <richert@braincorporation.com>

You have some weird indent before "Signed-off-by".
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 16f643a..885cf56 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -118,8 +118,10 @@  static void put_pages(struct drm_gem_object *obj)
 
 		if (iommu_present(&platform_bus_type))
 			drm_gem_put_pages(obj, msm_obj->pages, true, false);
-		else
+		else {
 			drm_mm_remove_node(msm_obj->vram_node);
+			drm_free_large(msm_obj->pages);
+		}
 
 		msm_obj->pages = NULL;
 	}