Commit eb98dc56 by Konstantin Käfer

make sure the database handle is properly deallocated when opening fails

parent 8e6b8f46
......@@ -150,6 +150,7 @@ int Database::EIO_Open(eio_req *req) {
if (baton->status != SQLITE_OK) {
baton->message = std::string(sqlite3_errmsg(db->handle));
sqlite3_close(db->handle);
db->handle = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment