THashInitConfig may not allocate array and increase memuse.
Such a failure leads to THashShutdown which should not decrease
the memuse.
Ticket: 7135
(cherry picked from commit
eeec609ac822a9d3ffc407428d6e6a75f4e30afa)
}
SCFreeAligned(ctx->array);
ctx->array = NULL;
+ (void)SC_ATOMIC_SUB(ctx->memuse, ctx->config.hash_size * sizeof(THashHashRow));
}
- (void) SC_ATOMIC_SUB(ctx->memuse, ctx->config.hash_size * sizeof(THashHashRow));
THashDataQueueDestroy(&ctx->spare_q);
SCFree(ctx);
return;