Skip to content

Commit 6f96453

Browse files
HBh25YZhengzengkai
authored andcommitted
drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
stable inclusion from stable-v5.10.118 commit e5289affbacc0d88214111774adb02d771d1213d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L686 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e5289affbacc0d88214111774adb02d771d1213d -------------------------------- commit 6e03b13 upstream. drm_dp_mst_get_edid call kmemdup to create mst_edid. So mst_edid need to be freed after use. Signed-off-by: Hangyu Hua <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Zheng Zengkai <[email protected]> Acked-by: Xie XiuQi <[email protected]>
1 parent 1916efd commit 6f96453

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/drm_dp_mst_topology.c

+1
Original file line numberDiff line numberDiff line change
@@ -4792,6 +4792,7 @@ static void fetch_monitor_name(struct drm_dp_mst_topology_mgr *mgr,
47924792

47934793
mst_edid = drm_dp_mst_get_edid(port->connector, mgr, port);
47944794
drm_edid_get_monitor_name(mst_edid, name, namelen);
4795+
kfree(mst_edid);
47954796
}
47964797

47974798
/**

0 commit comments

Comments
 (0)