From: Stéphane Marchesin Date: Mon, 19 Nov 2012 23:01:46 +0000 (-0800) Subject: DRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid(). X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e04984d087c95d7dd09be7cb6cb84e1f339c4f17;p=people%2Faperard%2Flinux-chromebook.git DRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid(). This was just posted on the dri-devel list, and affects us also. It's not a direct cherry-pick since we moved the code around. BUG=none TEST=by hand Change-Id: Ibd76bc48094e466fe574af23d37c8df1e0262a8d Signed-off-by: Egbert Eich Reviewed-on: https://gerrit.chromium.org/gerrit/38334 Reviewed-by: Sean Paul Commit-Ready: Stéphane Marchesin Tested-by: Stéphane Marchesin --- diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 900d7e1f7beec..e4289f575f5fd 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -911,6 +911,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector, DRM_DEBUG_KMS("%s : width[%d] x height[%d]\n", (hdata->has_hdmi_sink ? "hdmi monitor" : "dvi monitor"), raw_edid->width_cm, raw_edid->height_cm); + kfree(raw_edid); } else { return -ENODEV; }