Skip to content

Commit

Permalink
drm/bridge: vga-dac: Fix edid memory leak
Browse files Browse the repository at this point in the history
edid should be freed once it's finished being used.

Fixes: 56fe8b6 ("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]
  • Loading branch information
atseanpaul committed May 2, 2018
1 parent f7aef1c commit 49ceda9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/bridge/dumb-vga-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/*
Expand Down

0 comments on commit 49ceda9

Please sign in to comment.