From: Victor Julien Date: Fri, 20 Jan 2023 17:50:38 +0000 (+0100) Subject: smb: explicity free files X-Git-Tag: suricata-7.0.0-rc1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b1e9f7c216b68a9a655a7757fe771fde7a2d663;p=thirdparty%2Fsuricata.git smb: explicity free files In preparation of adding an argument to the free functions which means the drop trait can't be used anymore. --- diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index e811d13921..9979fc52e3 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -528,6 +528,10 @@ impl SMBTransaction { impl Drop for SMBTransaction { fn drop(&mut self) { + if let Some(SMBTransactionTypeData::FILE(ref mut tdf)) = self.type_data { + tdf.files.files_ts.free(); + tdf.files.files_tc.free(); + } self.free(); } }