drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
authorjsg <jsg@openbsd.org>
Wed, 25 May 2022 12:37:23 +0000 (12:37 +0000)
committerjsg <jsg@openbsd.org>
Wed, 25 May 2022 12:37:23 +0000 (12:37 +0000)
From Hangyu Hua
deec86168170d085d4f91445c1f72a900ed02372 in linux 5.15.y/5.15.42
6e03b13cc7d9427c2c77feed1549191015615202 in mainline linux

sys/dev/pci/drm/drm_dp_mst_topology.c

index 433537c..3d7002f 100644 (file)
@@ -4844,6 +4844,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);
 }
 
 /**