Commit ccd17469 authored by Sean Paul's avatar Sean Paul Committed by Greg Kroah-Hartman

drm/bridge: vga-dac: Fix edid memory leak

commit 49ceda9d upstream.

edid should be freed once it's finished being used.

Fixes: 56fe8b6f ("drm/bridge: Add RGB to VGA bridge support")
Cc: Rob Herring <robh@kernel.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: <stable@vger.kernel.org> # v4.9+
Reviewed-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180420190007.1572-1-seanpaul@chromium.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32c6a543
...@@ -53,7 +53,9 @@ static int dumb_vga_get_modes(struct drm_connector *connector) ...@@ -53,7 +53,9 @@ static int dumb_vga_get_modes(struct drm_connector *connector)
} }
drm_mode_connector_update_edid_property(connector, edid); 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;
fallback: fallback:
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment