diff --git a/YSFGateway/Reflectors.cpp b/YSFGateway/Reflectors.cpp index e465071..d2ac8a6 100644 --- a/YSFGateway/Reflectors.cpp +++ b/YSFGateway/Reflectors.cpp @@ -76,6 +76,9 @@ void CReflectors::setParrot(const std::string& address, unsigned int port) bool CReflectors::load() { + for (std::vector::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it) + delete *it; + m_newReflectors.clear(); FILE* fp = ::fopen(m_hostsFile.c_str(), "rt");