diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-09 17:18:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-09 17:18:19 +0000 |
commit | c708d7a3c0defba07171a70c68636d0b14abf590 (patch) | |
tree | 137e5a3ad52e602f6806609c817a8356ccee693c /src/modules/m_blockcaps.cpp | |
parent | 90063fd9210237ccc11bd08c84b25dcbebfee549 (diff) |
Same here, fix some minor memory leaks noticed by w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8551 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_blockcaps.cpp')
-rw-r--r-- | src/modules/m_blockcaps.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index c041feb31..44ad7e891 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -59,7 +59,10 @@ public: OnRehash(NULL,""); bc = new BlockCaps(ServerInstance); if (!ServerInstance->AddMode(bc)) + { + delete bc; throw ModuleException("Could not add new modes!"); + } Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, 3); } |