From dc42d5dda663d03bec7faaf80c037280879d13de Mon Sep 17 00:00:00 2001 From: Balazs Gyurak Date: Sun, 17 Nov 2019 13:03:05 +0000 Subject: [PATCH] Release database before exiting CLI interactive mode --- src/cli/keepassxc-cli.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cli/keepassxc-cli.cpp b/src/cli/keepassxc-cli.cpp index e16be9b29..98cc6be06 100644 --- a/src/cli/keepassxc-cli.cpp +++ b/src/cli/keepassxc-cli.cpp @@ -149,6 +149,7 @@ void enterInteractiveMode(const QStringList& arguments) prompt += "> "; command = reader->readLine(prompt); if (reader->isFinished()) { + currentDatabase->releaseData(); return; } @@ -162,6 +163,7 @@ void enterInteractiveMode(const QStringList& arguments) errorTextStream << QObject::tr("Unknown command %1").arg(args[0]) << "\n"; continue; } else if (cmd->name == "quit" || cmd->name == "exit") { + currentDatabase->releaseData(); return; }