1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 14:03:13 +02:00

Fix incorrect iteration when destructing modelockimpls

This commit is contained in:
Adam
2015-07-13 18:02:44 -04:00
parent ceddb8370c
commit a86162f287
+3 -2
View File
@@ -44,10 +44,11 @@ struct ModeLocksImpl : ModeLocks
~ModeLocksImpl()
{
for (ModeList::iterator it = this->mlocks->begin(); it != this->mlocks->end();)
ModeList modelist;
mlocks->swap(modelist);
for (ModeList::iterator it = modelist.begin(); it != modelist.end(); ++it)
{
ModeLock *ml = *it;
++it;
delete ml;
}
}