internet: fix Valgrind issue in 5d4fc177ab
This commit is contained in:
committed by
Tommaso Pecorella
parent
e2c56f2331
commit
324f5bd48c
@@ -88,7 +88,11 @@ void
|
||||
ArpCache::DoDispose()
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
Flush();
|
||||
for (auto& iter : m_arpCache)
|
||||
{
|
||||
delete iter.second; /* delete the pointer ArpCache::Entry */
|
||||
}
|
||||
m_arpCache.clear();
|
||||
m_device = nullptr;
|
||||
m_interface = nullptr;
|
||||
if (!m_waitReplyTimer.IsPending())
|
||||
|
||||
@@ -53,7 +53,11 @@ void
|
||||
NdiscCache::DoDispose()
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
Flush();
|
||||
for (auto& iter : m_ndCache)
|
||||
{
|
||||
delete iter.second; /* delete the pointer NdiscCache::Entry */
|
||||
}
|
||||
m_ndCache.clear();
|
||||
m_device = nullptr;
|
||||
m_interface = nullptr;
|
||||
m_icmpv6 = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user