drm/tegra: Plug memory leak
authorThierry Reding <treding@nvidia.com>
Tue, 4 Nov 2014 15:17:55 +0000 (16:17 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 15:18:32 +0000 (16:18 +0100)
Free the DRM device-private memory upon driver unload to make sure the
memory doesn't leak.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c

index 6c9df794b3be42dde9a2df18ffd263a1b2763eab..e549afeece1ff12c899afc9f21dd52ff5e3e64ff 100644 (file)
@@ -118,6 +118,8 @@ static int tegra_drm_unload(struct drm_device *drm)
                drm_mm_takedown(&tegra->mm);
        }
 
+       kfree(tegra);
+
        return 0;
 }