[PATCH] drm/gma500: fix edid memory leak in SDVO

From: Young Xiao
Date: Tue May 28 2019 - 22:04:42 EST


The variable edid returned by psb_intel_sdvo_get_edid()
was never freed.

Signed-off-by: Young Xiao <92siuyang@xxxxxxxxx>
---
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index dd3cec0..cc5fb85 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -1656,6 +1656,7 @@ static bool psb_intel_sdvo_detect_hdmi_audio(struct drm_connector *connector)
edid = psb_intel_sdvo_get_edid(connector);
if (edid != NULL && edid->input & DRM_EDID_INPUT_DIGITAL)
has_audio = drm_detect_monitor_audio(edid);
+ kfree(edid);

return has_audio;
}
--
2.7.4