]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
snmp: fixes leak of de_state
authorPhilippe Antoine <contact@catenacyber.fr>
Tue, 12 Oct 2021 11:29:25 +0000 (13:29 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 15 Nov 2021 13:33:16 +0000 (14:33 +0100)
Bug: #4752.
(cherry picked from commit 28a3181a2de0101b0796058eeffac0180eef35d6)

rust/src/snmp/snmp.rs

index 4a9fd8fa1f77d333f095aacb15978a3da63c88d0..cdc19c1c0053560360963d502b78d533f461ed1a 100644 (file)
@@ -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);
+        }
     }
 }