From: Raza Shafiq (rshafiq) Date: Mon, 25 Aug 2025 17:49:22 +0000 (+0000) Subject: Pull request #4873: flow: clear flow ref in pkt on stale flow cleanup X-Git-Tag: 3.9.5.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0236337fcda84008703fc6d220e9fd238127c945;p=thirdparty%2Fsnort3.git Pull request #4873: flow: clear flow ref in pkt on stale flow cleanup Merge in SNORT/snort3 from ~RSHAFIQ/snort3:stale_flow to master Squashed commit of the following: commit 7b40b1ea05c04f00f4abdae0b8a83bb42daaf801 Author: rshafiq Date: Tue Aug 19 11:17:00 2025 -0400 flow: clear flow ref in pkt on stale flow cleanup --- diff --git a/src/flow/flow_control.cc b/src/flow/flow_control.cc index 83cf80152..dba421799 100644 --- a/src/flow/flow_control.cc +++ b/src/flow/flow_control.cc @@ -174,7 +174,10 @@ Flow* FlowControl::stale_flow_cleanup(FlowCache* cache, Flow* flow, Packet* p) PacketTracerSuspend pt_susp; if ( cache->release(flow, PruneReason::STALE) ) + { flow = nullptr; + p->flow = nullptr; + } } }