]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Remember to free some stuff when failing in the ctor
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 9 Sep 2008 11:05:14 +0000 (11:05 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 9 Sep 2008 11:05:14 +0000 (11:05 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10489 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_mysql.cpp

index 7edf602e63d2a289a3611fa1c8901d5ae2a9c406..7e24202679ac772ac0414ef0c6a350b90b29ae6f 100644 (file)
@@ -761,6 +761,7 @@ ModuleSQL::ModuleSQL(InspIRCd* Me) : Module(Me), rehashing(false)
        if (MessagePipe->GetFd() == -1)
        {
                delete ConnMutex;
+               ServerInstance->Modules->DoneWithInterface("SQLutils");
                throw ModuleException("m_mysql: unable to create ITC pipe");
        }
        else
@@ -781,6 +782,11 @@ ModuleSQL::ModuleSQL(InspIRCd* Me) : Module(Me), rehashing(false)
                /* Tell worker thread to exit NOW,
                 * Automatically joins */
                delete Dispatcher;
+               delete LoggingMutex;
+               delete ResultsMutex;
+               delete QueueMutex;
+               delete ConnMutex;
+               ServerInstance->Modules->DoneWithInterface("SQLutils");
                throw ModuleException("m_mysql: Unable to publish feature 'SQL'");
        }