mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
commit 6e03b13cc7
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 <hbh25y@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220516032042.13166-1-hbh25y@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fb4ba0850e
commit
f8beb585b1
1 changed files with 1 additions and 0 deletions
|
@ -4852,6 +4852,7 @@ static void fetch_monitor_name(struct drm_dp_mst_topology_mgr *mgr,
|
|||
|
||||
mst_edid = drm_dp_mst_get_edid(port->connector, mgr, port);
|
||||
drm_edid_get_monitor_name(mst_edid, name, namelen);
|
||||
kfree(mst_edid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue