[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180420190007.1572-1-seanpaul@chromium.org>
Date: Fri, 20 Apr 2018 14:59:59 -0400
From: Sean Paul <seanpaul@...omium.org>
To: dri-devel@...ts.freedesktop.org
Cc: Sean Paul <seanpaul@...omium.org>, Rob Herring <robh@...nel.org>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Archit Taneja <architt@...eaurora.org>,
Andrzej Hajda <a.hajda@...sung.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
stable@...r.kernel.org, David Airlie <airlied@...ux.ie>,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm/bridge: vga-dac: Fix edid memory leak
edid should be freed once it's finished being used.
Fixes: 56fe8b6f4991 ("drm/bridge: Add RGB to VGA bridge support")
Cc: Rob Herring <robh@...nel.org>
Cc: Sean Paul <seanpaul@...omium.org>
Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc: Archit Taneja <architt@...eaurora.org>
Cc: Andrzej Hajda <a.hajda@...sung.com>
Cc: Laurent Pinchart <Laurent.pinchart@...asonboard.com>
Cc: <stable@...r.kernel.org> # v4.9+
Signed-off-by: Sean Paul <seanpaul@...omium.org>
---
drivers/gpu/drm/bridge/dumb-vga-dac.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
index 498d5948d1a8..9837c8d69e69 100644
--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
+++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
@@ -56,7 +56,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:
/*
--
Sean Paul, Software Engineer, Google / Chromium OS
Powered by blists - more mailing lists