summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-10-17 23:43:43 +0300
committerArchit Taneja <architt@codeaurora.org>2017-10-18 09:38:43 +0530
commit8b32948690946e89c198e44f8a1252295473f348 (patch)
tree0c1e0f00df9817f2db1b3eae505de785eb85f189 /drivers
parentaaddb6d22a49923c5223a4703af7710c249503da (diff)
downloadlinux-8b32948690946e89c198e44f8a1252295473f348.tar.gz
linux-8b32948690946e89c198e44f8a1252295473f348.tar.bz2
linux-8b32948690946e89c198e44f8a1252295473f348.zip
drm/bridge: adv7511: Fix a use after free
We free "edid", then use it again on the next line. Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20171017204343.zctliubjkq7imudi@mwanda
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/bridge/adv7511/adv7511_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 31ca883bda83..0e14f1572d05 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -607,10 +607,10 @@ static int adv7511_get_modes(struct adv7511 *adv7511,
adv7511_set_config_csc(adv7511, connector, adv7511->rgb,
drm_detect_hdmi_monitor(edid));
- kfree(edid);
-
cec_s_phys_addr_from_edid(adv7511->cec_adap, edid);
+ kfree(edid);
+
return count;
}