]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_mysql.cpp
Remember to free some stuff when failing in the ctor
[user/henk/code/inspircd.git] / 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'");
        }