diff --git a/src/devices/p2p/p2p-net-device.cc b/src/devices/p2p/p2p-net-device.cc index c37b946da..0a1063d4b 100644 --- a/src/devices/p2p/p2p-net-device.cc +++ b/src/devices/p2p/p2p-net-device.cc @@ -56,11 +56,7 @@ PointToPointNetDevice::~PointToPointNetDevice() { NS_DEBUG ("PointToPointNetDevice::~PointToPointNetDevice ()"); - if (m_channel) - { - m_channel->Unref (); - m_channel = 0; - } + Dispose (); delete m_queue; m_queue = 0;