From a2dc9a40e76ded08e084f1c11eff2140380e73ec Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 27 Jan 2023 20:30:20 +0100 Subject: [PATCH] flowworker: don't keep unnecessary flow reference Flow stream/detect/log flush packets, don't hold on to the flow beyond the flow worker module. --- src/flow-worker.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flow-worker.c b/src/flow-worker.c index 98e6c8210e..5e4588ff4b 100644 --- a/src/flow-worker.c +++ b/src/flow-worker.c @@ -406,6 +406,9 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat x->flow, x->flowflags & FLOW_PKT_TOSERVER ? STREAM_TOSERVER : STREAM_TOCLIENT); FLOWWORKER_PROFILING_END(x, PROFILE_FLOWWORKER_TCPPRUNE); + /* no need to keep a flow ref beyond this point */ + FlowDeReference(&x->flow); + if (timeout) { PacketPoolReturnPacket(x); } else {