]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: add defensive check on memuse
authorShivani Bhardwaj <shivani@oisf.net>
Tue, 21 May 2024 11:50:46 +0000 (17:20 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 22 May 2024 04:45:11 +0000 (06:45 +0200)
src/flow.c

index f402733d948a4044ab8bf3797fab1f95b19ac7ca..7f372efb944d12b711e5e74f79c1c5c7379d1e43 100644 (file)
@@ -708,6 +708,7 @@ void FlowShutdown(void)
     (void) SC_ATOMIC_SUB(flow_memuse, flow_config.hash_size * sizeof(FlowBucket));
     FlowQueueDestroy(&flow_recycle_q);
     FlowSparePoolDestroy();
+    DEBUG_VALIDATE_BUG_ON(SC_ATOMIC_GET(flow_memuse) != 0);
     return;
 }