diff options
author | Jani Nikula <[email protected]> | 2023-09-14 16:10:58 +0300 |
---|---|---|
committer | Chun-Kuang Hu <[email protected]> | 2023-09-24 14:35:41 +0000 |
commit | fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc (patch) | |
tree | c580923dd1b1e80598c31f5edc1c6a5bc5cefc9f | |
parent | dab12fa8d2bd3868cf2de485ed15a3feef28a13d (diff) |
drm/mediatek/dp: fix memory leak on ->get_edid callback error path
Setting new_edid to NULL leaks the buffer.
Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Cc: Markus Schneider-Pargmann <[email protected]>
Cc: Guillaume Ranquet <[email protected]>
Cc: Bo-Chen Chen <[email protected]>
Cc: CK Hu <[email protected]>
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: Dmitry Osipenko <[email protected]>
Cc: Chun-Kuang Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: <[email protected]> # v6.1+
Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Guillaume Ranquet <[email protected]>
Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Signed-off-by: Chun-Kuang Hu <[email protected]>
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index da023de5317a..e4c16ba9902d 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2063,6 +2063,7 @@ static struct edid *mtk_dp_get_edid(struct drm_bridge *bridge, */ if (mtk_dp_parse_capabilities(mtk_dp)) { drm_err(mtk_dp->drm_dev, "Can't parse capabilities\n"); + kfree(new_edid); new_edid = NULL; } |