]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: clean up recycle queue at shutdown
authorVictor Julien <victor@inliniac.net>
Tue, 6 May 2014 18:37:41 +0000 (20:37 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 28 Jul 2014 13:47:44 +0000 (15:47 +0200)
Mostly for tests that don't start the recycler thread, make sure
all flows are cleaned up.

src/flow.c

index 75963d8155b7bfb29f4ca3403e9b6e7d33bdd086..728e1225dbe114ceef499892ea27bffcd3c30752 100644 (file)
@@ -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) {