diff options
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_jumpserver.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 05203da39..8c07bfc6a 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -91,8 +91,10 @@ class SQLConn : public SQLProvider std::string host = tag->getString("hostname"); if (sqlite3_open_v2(host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0) != SQLITE_OK) { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id")); + // Even in case of an error conn must be closed + sqlite3_close(conn); conn = NULL; + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id")); } } diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index f59ef045d..89391c8a4 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -162,7 +162,7 @@ class ModuleJumpServer : public Module int port = js.GetPort(user); user->WriteNumeric(RPL_REDIR, js.redirect_to, port, "Please use this Server/Port instead"); ServerInstance->Users->QuitUser(user, js.reason); - return MOD_RES_PASSTHRU; + return MOD_RES_DENY; } return MOD_RES_PASSTHRU; } |