From: Victor Julien Date: Tue, 6 May 2014 18:37:41 +0000 (+0200) Subject: flow: clean up recycle queue at shutdown X-Git-Tag: suricata-2.1beta1~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52b0ec027ef39fb2ed8d3353d23cc7f491640d9b;p=thirdparty%2Fsuricata.git flow: clean up recycle queue at shutdown Mostly for tests that don't start the recycler thread, make sure all flows are cleaned up. --- diff --git a/src/flow.c b/src/flow.c index 75963d8155..728e1225db 100644 --- a/src/flow.c +++ b/src/flow.c @@ -444,10 +444,13 @@ void FlowShutdown(void) FlowPrintStats(); - /* free spare queue */ + /* free queues */ while((f = FlowDequeue(&flow_spare_q))) { FlowFree(f); } + while((f = FlowDequeue(&flow_recycle_q))) { + FlowFree(f); + } /* clear and free the hash */ if (flow_hash != NULL) {