CID
1554240: Data race undermines locking (LOCK_EVASION)
*/
void HostCleanup(void)
{
- Host *h;
- uint32_t u;
-
if (host_hash != NULL) {
- for (u = 0; u < host_config.hash_size; u++) {
- h = host_hash[u].head;
+ for (uint32_t u = 0; u < host_config.hash_size; u++) {
HostHashRow *hb = &host_hash[u];
HRLOCK_LOCK(hb);
+ Host *h = host_hash[u].head;
while (h) {
if ((SC_ATOMIC_GET(h->use_cnt) > 0) && (h->iprep != NULL)) {
/* iprep is attached to host only clear local storage */