SWDEV-339551 - Prevent ICD from loading outdated amdocl binary

1.Keep track of library name in KHRicdVendorRec
2.Check if library with the same name has already been loaded before adding it in ICD list
CL#1760530

Change-Id: I1e0356422c71963788b76019b0d8db5b8542f9ee
This commit is contained in:
Todd tiantuo Li
2022-06-06 05:42:19 -07:00
parent 7fdb3d3c97
commit ed40c24fa3
4 changed files with 42 additions and 0 deletions
@@ -135,6 +135,16 @@ void khrIcdOsVendorsEnumerate(void)
}
closedir(dir);
KHRicdVendor *vendorIterator;
for (vendorIterator = khrIcdVendors; vendorIterator; vendorIterator = vendorIterator->next)
{
if (vendorIterator->libName != NULL)
{
free(vendorIterator->libName);
vendorIterator->libName = NULL;
}
}
}
if (NULL != envPath)