From: Micah Richert Date: Wed, 9 Apr 2014 21:11:31 +0000 (-0700) Subject: drm/msm: fix memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1ffa2425bf7cc70f87d5cdbe12175fd4c661dd19;p=linux-beck.git drm/msm: fix memory leak Signed-off-by: Micah Richert Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 3da8264d3039..bb8026daebc9 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; }