1
0

Fixed memory leaks in the HTTP framework

This commit is contained in:
madmaxoft
2013-10-06 16:40:28 +02:00
parent 4bf596a586
commit f55b77a98a
5 changed files with 43 additions and 6 deletions

View File

@@ -179,9 +179,9 @@ void cHTTPServer::Stop(void)
// Drop all current connections:
cCSLock Lock(m_CSConnections);
for (cHTTPConnections::iterator itr = m_Connections.begin(), end = m_Connections.end(); itr != end; ++itr)
while (!m_Connections.empty())
{
m_SocketThreads.RemoveClient(*itr);
m_Connections.front()->Terminate();
} // for itr - m_Connections[]
}
@@ -213,6 +213,7 @@ void cHTTPServer::CloseConnection(cHTTPConnection & a_Connection)
break;
}
}
delete &a_Connection;
}