1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 08:16:39 +02:00

Fixed bug #1276 and some other valgrind warnings

This commit is contained in:
Adam
2011-06-23 15:10:50 -04:00
parent 3be75cbcb3
commit b1a075b462
4 changed files with 20 additions and 8 deletions
+6 -2
View File
@@ -15,8 +15,12 @@ void SocketEngine::Shutdown()
{
Process();
for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end; ++it)
delete it->second;
for (std::map<int, Socket *>::const_iterator it = Sockets.begin(), it_end = Sockets.end(); it != it_end;)
{
Socket *s = it->second;
++it;
delete s;
}
Sockets.clear();
MaxFD = 0;