summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2018-04-20 14:59:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-09 09:50:22 +0200
commitccd174692f70da88ef5dac8292ccd3271b08643a (patch)
tree5963a4826f758c8b10a043ffb5d1b005cc0a9d2a /drivers
parent32c6a543d8a58cb4df06e103dae241d848263938 (diff)
downloadlinux-stable-ccd174692f70da88ef5dac8292ccd3271b08643a.tar.gz
linux-stable-ccd174692f70da88ef5dac8292ccd3271b08643a.tar.bz2
linux-stable-ccd174692f70da88ef5dac8292ccd3271b08643a.zip
drm/bridge: vga-dac: Fix edid memory leak
commit 49ceda9de2da4d1827941d06701f3017c27c1855 upstream. edid should be freed once it's finished being used. Fixes: 56fe8b6f4991 ("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: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180420190007.1572-1-seanpaul@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/bridge/dumb-vga-dac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
index afec232185a7..cfd80bc510b6 100644
--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
+++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
@@ -53,7 +53,9 @@ static int dumb_vga_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;
fallback:
/*