From: Philippe Antoine Date: Tue, 12 Oct 2021 11:29:25 +0000 (+0200) Subject: snmp: fixes leak of de_state X-Git-Tag: suricata-5.0.8~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad5b39a52a1f129852866e792ac30211cd49d94c;p=thirdparty%2Fsuricata.git snmp: fixes leak of de_state Bug: #4752. (cherry picked from commit 28a3181a2de0101b0796058eeffac0180eef35d6) --- diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index 4a9fd8fa1f..cdc19c1c00 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -281,6 +281,9 @@ impl SNMPTransaction { if self.events != std::ptr::null_mut() { core::sc_app_layer_decoder_events_free_events(&mut self.events); } + if let Some(de_state) = self.de_state { + core::sc_detect_engine_state_free(de_state); + } } }