1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 11:36:38 +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
@@ -39,8 +39,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();
delete [] events;