]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: cleanup validation check
authorVictor Julien <victor@inliniac.net>
Mon, 11 May 2020 15:33:02 +0000 (17:33 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Jul 2020 08:28:49 +0000 (10:28 +0200)
src/flow.c

index 899e4fad86dfa778adcc7036a96e2d15e9ce64d6..a7384b6dc99f2515dd3381b9b8fca6bf9a3c8553 100644 (file)
@@ -56,6 +56,7 @@
 
 #include "util-debug.h"
 #include "util-privs.h"
+#include "util-validate.h"
 
 #include "detect.h"
 #include "detect-engine-state.h"
@@ -703,9 +704,7 @@ void FlowShutdown(void)
         for (u = 0; u < flow_config.hash_size; u++) {
             f = flow_hash[u].head;
             while (f) {
-#ifdef DEBUG_VALIDATION
-                BUG_ON(SC_ATOMIC_GET(f->use_cnt) != 0);
-#endif
+                DEBUG_VALIDATE_BUG_ON(SC_ATOMIC_GET(f->use_cnt) != 0);
                 Flow *n = f->hnext;
                 uint8_t proto_map = FlowGetProtoMapping(f->proto);
                 FlowClearMemory(f, proto_map);