]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: fix restart/shutdown cycle
authorVictor Julien <victor@inliniac.net>
Thu, 11 Dec 2014 13:21:45 +0000 (14:21 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 11 Dec 2014 13:21:45 +0000 (14:21 +0100)
When cleaning up after a pcap was processed, the stats api was cleaned
up before the stats threads were killed, leading to a BUG_ON triggering.

src/runmode-unix-socket.c

index d8d55a10d8fd162397f9512e4dd84ee9af93c6bc..83daaaf0c99b5cf728d2e46879054e811fbb3464 100644 (file)
@@ -295,13 +295,14 @@ TmEcode UnixSocketPcapFilesCheck(void *data)
         TmThreadKillThreadsFamily(TVT_PPT);
         TmThreadClearThreadsFamily(TVT_PPT);
         FlowKillFlowRecyclerThread();
-        RunModeShutDown();
 
         /* kill remaining mgt threads */
         TmThreadKillThreadsFamily(TVT_MGMT);
         TmThreadClearThreadsFamily(TVT_MGMT);
         SCPerfReleaseResources();
 
+        RunModeShutDown();
+
         /* mgt and ppt threads killed, we can run non thread-safe
          * shutdown functions */
         FlowShutdown();