Correct flow memory usage bookkeeping error

Fix bug 1321 where flow_memuse was incremented more on allocation than
free.
pull/1239/head
Ken Steele 10 years ago committed by Victor Julien
parent d951de2f19
commit 68e6c4e94b

@ -79,7 +79,8 @@ void FlowFree(Flow *f)
FLOW_DESTROY(f); FLOW_DESTROY(f);
SCFree(f); SCFree(f);
(void) SC_ATOMIC_SUB(flow_memuse, sizeof(Flow)); size_t size = sizeof(Flow) + FlowStorageSize();
(void) SC_ATOMIC_SUB(flow_memuse, size);
} }
/** /**

Loading…
Cancel
Save