]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flowworker: don't keep unnecessary flow reference
authorVictor Julien <vjulien@oisf.net>
Fri, 27 Jan 2023 19:30:20 +0000 (20:30 +0100)
committerVictor Julien <vjulien@oisf.net>
Mon, 30 Jan 2023 10:02:21 +0000 (11:02 +0100)
Flow stream/detect/log flush packets, don't hold on to the flow
beyond the flow worker module.

src/flow-worker.c

index 98e6c8210e329371459a93801f9ae261718282da..5e4588ff4bccd05d4516df2b9d52386650e391f7 100644 (file)
@@ -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 {