From 68e6c4e94b8b7e5d61ea7062ff21d2678bedde32 Mon Sep 17 00:00:00 2001 From: Ken Steele Date: Wed, 19 Nov 2014 13:48:41 -0500 Subject: [PATCH] Correct flow memory usage bookkeeping error Fix bug 1321 where flow_memuse was incremented more on allocation than free. --- src/flow-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flow-util.c b/src/flow-util.c index 7bd685743a..b4b54c188e 100644 --- a/src/flow-util.c +++ b/src/flow-util.c @@ -79,7 +79,8 @@ void FlowFree(Flow *f) FLOW_DESTROY(f); SCFree(f); - (void) SC_ATOMIC_SUB(flow_memuse, sizeof(Flow)); + size_t size = sizeof(Flow) + FlowStorageSize(); + (void) SC_ATOMIC_SUB(flow_memuse, size); } /**