diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 20:58:58 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 20:58:58 +0200 |
commit | 5267fb9d362aeb326c9e64f7171c957f76776f90 (patch) | |
tree | b287fb375550610e50c52d37673c8798c4d8a719 /src/modules/extra | |
parent | 0b0b8d9e06139d41ebf7e304fe8b80bf1fae6448 (diff) | |
parent | 5288575567d453ebd9dfbec44e4948599527dde9 (diff) |
Merge insp20
Diffstat (limited to 'src/modules/extra')
-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")); } } |