diff --git a/src/suricata.c b/src/suricata.c index f3ca71c1e2..dc5f55c48f 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -358,8 +358,6 @@ void GlobalsDestroy(SCInstance *suri) #endif #endif - SCPidfileRemove(suri->pid_filename); - AppLayerHtpPrintStats(); /* TODO this can do into it's own func */ @@ -414,6 +412,8 @@ void GlobalsDestroy(SCInstance *suri) #endif SCLogDeInitLogModule(); DetectParseFreeRegexes(); + + SCPidfileRemove(suri->pid_filename); } /** \brief make sure threads can stop the engine by calling this