Clean up flow mutexes after use.

remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 166a663941
commit 5e3f072fa6

@ -47,6 +47,7 @@ void FlowFree(Flow *f)
flow_memuse -= sizeof(Flow);
SCMutexUnlock(&flow_memuse_mutex);
SCMutexDestroy(&f->m);
SCFree(f);
}

@ -575,6 +575,7 @@ void FlowPrintQueueInfo (void)
void FlowShutdown(void) {
Flow *f;
int i;
uint32_t u;
while((f = FlowDequeue(&flow_spare_q))) {
FlowFree(f);
@ -598,6 +599,10 @@ void FlowShutdown(void) {
}
if (flow_hash != NULL) {
/* clean up flow mutexes */
for (u = 0; u < flow_config.hash_size; u++) {
SCMutexDestroy(&flow_hash[u].m);
}
SCFree(flow_hash);
flow_hash = NULL;
}

Loading…
Cancel
Save