From: Victor Julien Date: Wed, 5 Dec 2012 17:55:45 +0000 (+0100) Subject: flow: only BUG_ON use_cnt in flows when compiled with debug-validation X-Git-Tag: suricata-1.4~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=298d21372b52333f7103fbde0925daa4d77ec78e;p=thirdparty%2Fsuricata.git flow: only BUG_ON use_cnt in flows when compiled with debug-validation --- diff --git a/src/flow.c b/src/flow.c index 11c7bc4370..5abedb2ddb 100644 --- a/src/flow.c +++ b/src/flow.c @@ -474,7 +474,9 @@ void FlowShutdown(void) for (u = 0; u < flow_config.hash_size; u++) { Flow *f = flow_hash[u].head; while (f) { +#ifdef DEBUG_VALIDATION BUG_ON(SC_ATOMIC_GET(f->use_cnt) != 0); +#endif Flow *n = f->hnext; uint8_t proto_map = FlowGetProtoMapping(f->proto); FlowClearMemory(f, proto_map);