summaryrefslogtreecommitdiff
path: root/src/modules/m_joinflood.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-13 18:18:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-13 18:18:51 +0000
commit202d24ba9e8780c840eb3fefbeccfb41bea72343 (patch)
tree36962c360526aac202a7b78a2dcd10dd400b8710 /src/modules/m_joinflood.cpp
parent844abcbc569f68e3aa9adc04bad599117ed55327 (diff)
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
Diffstat (limited to 'src/modules/m_joinflood.cpp')
-rw-r--r--src/modules/m_joinflood.cpp5
1 files changed, 4 insertions, 1 deletions
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);