diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 9 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 0491b3c20..554dd17dd 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -117,9 +117,6 @@ class ModuleSSLGnuTLS : public Module virtual void OnRehash(User* user, const std::string ¶m) { - if(param != "ssl") - return; - Conf = new ConfigReader(ServerInstance); for(unsigned int i = 0; i < listenports.size(); i++) @@ -168,6 +165,12 @@ class ModuleSSLGnuTLS : public Module } } + if(param != "ssl") + { + delete Conf; + return; + } + std::string confdir(ServerInstance->ConfigFileName); // +1 so we the path ends with a / confdir = confdir.substr(0, confdir.find_last_of('/') + 1); diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 562b5432b..f54e041f3 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -156,9 +156,6 @@ class ModuleSSLOpenSSL : public Module virtual void OnRehash(User* user, const std::string ¶m) { - if (param != "ssl") - return; - ConfigReader Conf(ServerInstance); for (unsigned int i = 0; i < listenports.size(); i++) @@ -210,6 +207,12 @@ class ModuleSSLOpenSSL : public Module if (!sslports.empty()) sslports.erase(sslports.end() - 1); + if (param != "ssl") + { + delete Conf; + return; + } + std::string confdir(ServerInstance->ConfigFileName); // +1 so we the path ends with a / confdir = confdir.substr(0, confdir.find_last_of('/') + 1); |