[pim/kleopatra] tests: Don't leak DecryptVerifyJob that is exec'd

Ingo Klöcker <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 665f25c1ee93f7a1ff04a30af347b3aec40808e6 by Ingo Klöcker, on behalf of Ingo Klöcker.
Committed on 29/07/2026 at 10:07.
Pushed by kloecker into branch 'master'.

Don't leak DecryptVerifyJob that is exec'd

M  +1    -1    tests/test_verify.cpp

https://invent.kde.org/pim/kleopatra/-/commit/665f25c1ee93f7a1ff04a30af347b3aec40808e6

diff --git a/tests/test_verify.cpp b/tests/test_verify.cpp
index 2e7413a45..0376c5aa3 100644
--- a/tests/test_verify.cpp
+++ b/tests/test_verify.cpp
@@ -162,7 +162,7 @@ private Q_SLOTS:
         QVERIFY(sigFile.open(QFile::ReadOnly));
         const QByteArray ciphertext = sigFile.readAll();
 
-        QGpgME::DecryptVerifyJob *job = mBackend->decryptVerifyJob();
+        const std::unique_ptr<QGpgME::DecryptVerifyJob> job{mBackend->decryptVerifyJob()};
         result = job->exec(ciphertext, plaintext);
         QVERIFY(result.first.error().code());
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.