host: fix minor coverity warning

CID 1554240:  Data race undermines locking  (LOCK_EVASION)
pull/9882/head
Victor Julien 2 years ago committed by Victor Julien
parent 3a79984e5e
commit 1f7e61ef61

@ -340,14 +340,11 @@ void HostShutdown(void)
*/
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 */

Loading…
Cancel
Save