diff options
| author | 2016-09-02 20:58:58 +0200 | |
|---|---|---|
| committer | 2016-09-02 20:58:58 +0200 | |
| commit | 5267fb9d362aeb326c9e64f7171c957f76776f90 (patch) | |
| tree | b287fb375550610e50c52d37673c8798c4d8a719 /src/modules/extra/m_sqlite3.cpp | |
| parent | m_dnsbl Use FindAnswerOfType (diff) | |
| parent | m_jumpserver Prevent OnUserRegister from running in other modules for users w... (diff) | |
Merge insp20
Diffstat (limited to 'src/modules/extra/m_sqlite3.cpp')
| -rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 4 |
1 files changed, 3 insertions, 1 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")); } } |
