diff --git a/src/flow-worker.c b/src/flow-worker.c index 1363e27b88..c659fe3956 100644 --- a/src/flow-worker.c +++ b/src/flow-worker.c @@ -399,6 +399,13 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat OutputLoggerLog(tv, x, fw->output_thread); + FramesPrune(x->flow, x); + /* Release tcp segments. Done here after alerting can use them. */ + FLOWWORKER_PROFILING_START(x, PROFILE_FLOWWORKER_TCPPRUNE); + StreamTcpPruneSession( + x->flow, x->flowflags & FLOW_PKT_TOSERVER ? STREAM_TOSERVER : STREAM_TOCLIENT); + FLOWWORKER_PROFILING_END(x, PROFILE_FLOWWORKER_TCPPRUNE); + if (timeout) { PacketPoolReturnPacket(x); } else {