Try to avoid memory leak in tcpd

This commit is contained in:
Jeremy Soller 2016-10-26 14:20:08 -06:00
parent 875db86f30
commit 2095de83e8

View file

@ -604,6 +604,8 @@ impl SchemeMut for Tcpd {
let closed = {
let mut handle = self.handles.get_mut(&file).ok_or(Error::new(EBADF))?;
handle.data.clear();
match handle.state {
State::SynReceived | State::Established => {
handle.state = State::FinWait1;