Check for NULL in unloading of preloaded-icd's
authorCharles Giessen <charles@lunarg.com>
Wed, 8 May 2024 19:31:15 +0000 (14:31 -0500)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Wed, 8 May 2024 20:20:30 +0000 (14:20 -0600)
commiteb8c7b071a449be3d1331e0961c8fdd0a78efca9
treeadf1ed00f0cdf70ab65618d1da18e210b021cbdf
parent69a9fc7602bb0d77039b9fcb9e6df1a542f10009
Check for NULL in unloading of preloaded-icd's

strcmp has undefined behavior if either parameter is NULL. Due to clearing
out unloaded entries, this would cause unload_drivers_without_physical_devices
to try to compare against already unloaded entries.

This commit also condenses the preloaded_icds list so that it doesn't contain
gaps.
loader/loader.c
tests/loader_regression_tests.cpp