drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
authorHangyu Hua <hbh25y@gmail.com>
Mon, 16 May 2022 03:20:42 +0000 (11:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 07:57:28 +0000 (09:57 +0200)
commitdeec86168170d085d4f91445c1f72a900ed02372
treef2d7084606195f49bd06a1878346972442fd8f24
parentaaf0f01d074d6fd39ec1b01477f69cd688bf6c9d
drm/dp/mst: fix a possible memory leak in fetch_monitor_name()

commit 6e03b13cc7d9427c2c77feed1549191015615202 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>
drivers/gpu/drm/drm_dp_mst_topology.c