Skip to content

Commit

Permalink
drm/exynos/hdmi: fix edid memory leak
Browse files Browse the repository at this point in the history
edid returned by drm_get_edid should be freed.
The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Andrzej Hajda authored and Inki Dae committed Aug 11, 2015
1 parent f2d0160 commit e6e771d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
{
struct hdmi_context *hdata = ctx_from_connector(connector);
struct edid *edid;
int ret;

if (!hdata->ddc_adpt)
return -ENODEV;
Expand All @@ -1079,7 +1080,11 @@ static int hdmi_get_modes(struct drm_connector *connector)

drm_mode_connector_update_edid_property(connector, edid);

return drm_add_edid_modes(connector, edid);
ret = drm_add_edid_modes(connector, edid);

kfree(edid);

return ret;
}

static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)
Expand Down

0 comments on commit e6e771d

Please sign in to comment.