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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user