]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix owines crashes here too
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 10 Nov 2007 20:34:30 +0000 (20:34 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 10 Nov 2007 20:34:30 +0000 (20:34 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8561 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_cloaking.cpp

index 43a0f569353c744d7d50ae2d77f92e7d59de04c6..c2f721945fd71d2494aa17a654c331a1abcf3696 100644 (file)
@@ -319,16 +319,12 @@ class ModuleCloaking : public Module
        ModuleCloaking(InspIRCd* Me)
                : Module(Me)
        {
        ModuleCloaking(InspIRCd* Me)
                : Module(Me)
        {
-               /* Create new mode handler object */
-               cu = new CloakUser(ServerInstance, this, HashModule);
-
                /* Attempt to locate the md5 service provider, bail if we can't find it */
                HashModule = ServerInstance->Modules->Find("m_md5.so");
                if (!HashModule)
                /* Attempt to locate the md5 service provider, bail if we can't find it */
                HashModule = ServerInstance->Modules->Find("m_md5.so");
                if (!HashModule)
-               {
-                       delete cu;
                        throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_cloaking.so.");
                        throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_cloaking.so.");
-               }
+
+               cu = new CloakUser(ServerInstance, this, HashModule);
 
                try
                {
 
                try
                {