From 202d24ba9e8780c840eb3fefbeccfb41bea72343 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Sep 2006 18:18:51 +0000 Subject: Fix minor memory leak when setting new param that replaces old git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5228 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_joinflood.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/m_joinflood.cpp') diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 54798910c..99a872457 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -171,7 +171,10 @@ class JoinFlood : public ModeHandler // new mode param, replace old with new if ((nsecs > 0) && (njoins > 0)) { - joinfloodsettings *f = new joinfloodsettings(nsecs,njoins); + joinfloodsettings* f; + channel->GetExt("joinflood", f); + delete f; + f = new joinfloodsettings(nsecs,njoins); channel->Shrink("joinflood"); channel->Extend("joinflood", f); channel->SetModeParam('j', cur_param.c_str(), false); -- cgit v1.2.3