aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <[email protected]>2018-04-20 14:59:59 -0400
committerSean Paul <[email protected]>2018-05-02 15:09:21 -0400
commit49ceda9de2da4d1827941d06701f3017c27c1855 (patch)
treebeb1feee01a0f9c8ac285a5d2bf3214b7a8863e3
parentf7aef1c207092770d06d0df21dceafdca2b49c39 (diff)
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 <[email protected]> Cc: Sean Paul <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Archit Taneja <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: <[email protected]> # v4.9+ Reviewed-by: Maxime Ripard <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-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 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:
/*