From: danieldg Date: Thu, 20 Aug 2009 13:40:35 +0000 (+0000) Subject: Fix access-after-free on rehash X-Git-Tag: v2.0.23~1703 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d9dcf0459cc5d23d1527f33b108d1d8417f8dce3;p=user%2Fhenk%2Fcode%2Finspircd.git Fix access-after-free on rehash git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11534 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/configreader.cpp b/src/configreader.cpp index a6d6e3c85..7babc7bb7 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -706,8 +706,8 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) ClassMap::iterator oldMask = oldBlocksByMask.find(typeMask); if (oldMask != oldBlocksByMask.end()) { - oldBlocksByMask.erase(oldMask); ConnectClass* old = oldMask->second; + oldBlocksByMask.erase(oldMask); old->Update(me); delete me; me = old;