]> 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>
Tue, 7 Feb 2023 15:45:35 +0000 (16:45 +0100)
Flow stream/detect/log flush packets, don't hold on to the flow
beyond the flow worker module.

(cherry picked from commit a2dc9a40e76ded08e084f1c11eff2140380e73ec)

src/flow-worker.c

index 984b81a875c6ca3bae31c0dea28f3925e4322c97..3b7c69be8030797bf1bffa375944397dd6b7ccf0 100644 (file)
@@ -390,6 +390,9 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat
 
         OutputLoggerLog(tv, x, fw->output_thread);
 
+        /* no need to keep a flow ref beyond this point */
+        FlowDeReference(&x->flow);
+
         if (timeout) {
             PacketPoolReturnPacket(x);
         } else {