From 2885bc99caed3c7e02f6145e7608800255408185 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 21 Jul 2019 18:50:16 +0200 Subject: [PATCH] Fix memory leak in Database::BackupFile --- src/core/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index 1d8ac1f83..d16ca7dbe 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -649,7 +649,7 @@ void Database::BackupFile(const QString &filename) { sqlite3 *source_connection = nullptr; sqlite3 *dest_connection = nullptr; - BOOST_SCOPE_EXIT((source_connection)(dest_connection)(task_id)(app_)) { + BOOST_SCOPE_EXIT((&source_connection)(&dest_connection)(task_id)(app_)) { // Harmless to call sqlite3_close() with a nullptr pointer. sqlite3_close(source_connection); sqlite3_close(dest_connection);