From 01dbd2658f357b4978f6ac7494704a24548228db Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 19 Aug 2009 15:09:27 +0000 Subject: Fix a regression from fcb51634669e6ed588e42f2072c6f910e267126f ("fix uid collision on spanningtree reload") caused by access-after-free. Thanks to transnet for the report. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11533 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 9ae6d4d14..46769a6f4 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -176,8 +176,10 @@ SpanningTreeUtilities::~SpanningTreeUtilities() sock->Close(); } } - delete TreeRoot; + + // This avoids a collision on reload ServerUser->uuid = TreeRoot->GetID(); + delete TreeRoot; delete ServerUser; ServerInstance->BufferedSocketCull(); } -- cgit v1.2.3