[igt-dev] [PATCH i-g-t 1/1] lib/igt_device_scan: clear igt_devs.devs_scanned in igt_devices_free

Riana Tauro riana.tauro at intel.com
Thu Sep 15 13:57:39 UTC 2022


igt_devices_scan returns with empty list if devs_scanned
is true and function is called after igt_devices_free

clear igt_devs.devs_scanned in igt_devices_free.

Signed-off-by: Riana Tauro <riana.tauro at intel.com>
---
 lib/igt_device_scan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index eb6b45b8..e7c05d5c 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -1030,6 +1030,7 @@ void igt_devices_free(void)
 		igt_device_free(dev);
 		free(dev);
 	}
+	igt_devs.devs_scanned = false;
 }
 
 /**
-- 
2.25.1



More information about the igt-dev mailing list