From: Victor Julien Date: Fri, 20 Jan 2023 17:50:18 +0000 (+0100) Subject: nfs: explicity free files X-Git-Tag: suricata-7.0.0-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a24cce289cc3630ab5a388e4abba8f9f8341a64;p=thirdparty%2Fsuricata.git nfs: 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/nfs/nfs.rs b/rust/src/nfs/nfs.rs index f6d76ec189..9961561bd6 100644 --- a/rust/src/nfs/nfs.rs +++ b/rust/src/nfs/nfs.rs @@ -258,6 +258,10 @@ impl Transaction for NFSTransaction { impl Drop for NFSTransaction { fn drop(&mut self) { + if let Some(NFSTransactionTypeData::FILE(ref mut tdf)) = self.type_data { + tdf.files.files_ts.free(); + tdf.files.files_tc.free(); + } self.free(); } }