[Intel-gfx] [PATCH i-g-t 1/3] lib/igt_device_scan: Free filtered devices in igt_devices_free

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri May 27 10:50:40 UTC 2022


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Fix a possible oversight.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 lib/igt_device_scan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index 3c23fe0eb520..a30433ae2cff 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -814,6 +814,11 @@ void igt_devices_free(void)
 		igt_device_free(dev);
 		free(dev);
 	}
+
+	igt_list_for_each_entry_safe(dev, tmp, &igt_devs.filtered, link) {
+		igt_list_del(&dev->link);
+		free(dev);
+	}
 }
 
 /**
-- 
2.32.0



More information about the Intel-gfx mailing list