Bugzilla – Attachment #1907: Patch to fix tcp-socket-base.cc deallocation bug. for bug #1791
void
TcpSocketBase::CloseAndNotify (void)
{
Ptr<TcpSocketBase> l_ptr = (m_state == TIME_WAIT ? this : 0);
NS_LOG_FUNCTION (this);
if (!m_closeNotified)
NotifyNormalClose ();
}
if (m_state != TIME_WAIT)
DeallocateEndPoint ();
m_closeNotified = true;
NS_LOG_INFO (TcpStateName[m_state] << " -> CLOSED");
CancelAllTimers ();