aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_oper_hash.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-11-09 17:14:46 +0000
committerGravatar brain2007-11-09 17:14:46 +0000
commitb43eb6b7c45e26f2ce6fbf01f18bef8b03079933 (patch)
treedb5642affe37c53a96db8ecf3faa77a86b1aff7e /src/modules/m_oper_hash.cpp
parentMake AddMode the last thing the constructor does. (diff)
Tidy up some minor memory leaks that can result in mode handlers or some other memory items not being freed if the module throws in the constructor
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8550 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_oper_hash.cpp')
-rw-r--r--src/modules/m_oper_hash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index b4661741b..f91527726 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -84,8 +84,6 @@ class ModuleOperHash : public Module
Conf = NULL;
OnRehash(NULL,"");
- ServerInstance->UseInterface("HashRequest");
-
/* Find all modules which implement the interface 'HashRequest' */
modulelist* ml = ServerInstance->FindInterface("HashRequest");
@@ -109,6 +107,8 @@ class ModuleOperHash : public Module
throw ModuleException("I can't find any modules loaded which implement the HashRequest interface! You probably forgot to load a hashing module such as m_md5.so or m_sha256.so.");
}
+ ServerInstance->UseInterface("HashRequest");
+
mycommand = new cmd_mkpasswd(ServerInstance, this, hashers, names);
ServerInstance->AddCommand(mycommand);
}