summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2012-11-20 13:30:16 +0400
committerInki Dae <inki.dae@samsung.com>2012-12-05 09:39:20 +0400
commit3dc5fa9a157b9675775446fb83888b1803e0288a (patch)
tree1c4dcedd5d4d73e962b5bb7a480f0a37a4eb4fb8 /drivers/gpu/drm/exynos/exynos_hdmi.c
parent465ed6606018b56d55219b6c58a7b98793d8cbcc (diff)
downloadlinux-3dc5fa9a157b9675775446fb83888b1803e0288a.tar.xz
drm/exynos: fix memory leak to EDID block
drm_get_edid() returns a pointer to an EDID block. The caller is responsible to free this pointer itself. Here the pointer gets assigned to the local variable raw_edid. Therefore it should be freed before the variable goes out of scope. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index c73f43874944..6716ecd3b3e9 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1293,6 +1293,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector,
DRM_DEBUG_KMS("%s : width[%d] x height[%d]\n",
(hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
raw_edid->width_cm, raw_edid->height_cm);
+ kfree(raw_edid);
} else {
return -ENODEV;
}