dcerpc/tcp: add missing detect state cleanup

pull/5533/head
Victor Julien 4 years ago
parent c72069c3b2
commit 67b5295bbc

@ -17,7 +17,7 @@
use std::mem::transmute;
use crate::applayer::{AppLayerResult, AppLayerTxData};
use crate::core;
use crate::core::{self, sc_detect_engine_state_free};
use crate::dcerpc::parser;
use nom::error::ErrorKind;
use nom::number::Endianness;
@ -184,6 +184,15 @@ impl DCERPCTransaction {
};
}
pub fn free(&mut self) {
match self.de_state {
Some(state) => {
sc_detect_engine_state_free(state);
}
_ => {}
}
}
pub fn get_req_ctxid(&self) -> u16 {
self.ctxid
}
@ -201,6 +210,12 @@ impl DCERPCTransaction {
}
}
impl Drop for DCERPCTransaction {
fn drop(&mut self) {
self.free();
}
}
#[derive(Debug)]
pub struct DCERPCRequest {
pub ctxid: u16,

Loading…
Cancel
Save