diff --git a/P25Reflector/P25Reflector.cpp b/P25Reflector/P25Reflector.cpp index bb5b571..62783e3 100644 --- a/P25Reflector/P25Reflector.cpp +++ b/P25Reflector/P25Reflector.cpp @@ -233,8 +233,8 @@ void CP25Reflector::run() for (std::vector::iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it) { if (CUDPSocket::match((*it)->m_addr, rpt->m_addr)) { - m_repeaters.erase(it); delete *it; + m_repeaters.erase(it); break; } } @@ -304,8 +304,8 @@ void CP25Reflector::run() LogMessage("Removing %s (%s) disappeared", (*it)->m_callsign.c_str(), CUDPSocket::display((*it)->m_addr, buff, 80U)); - m_repeaters.erase(it); delete *it; + m_repeaters.erase(it); break; } }