[pim/libkleo] /: Don't leak jobs in formattingtest
Ingo Klöcker <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 52920fa4c15e91af31c19164965ad706a0c27f9f by Ingo Klöcker, on behalf of Ingo Klöcker.
Committed on 28/07/2026 at 15:20.
Pushed by kloecker into branch 'master'.
Don't leak jobs in formattingtest
M +2 -2 autotests/formattingtest.cpp
M +1 -0 sanitizers.supp
https://invent.kde.org/pim/libkleo/-/commit/52920fa4c15e91af31c19164965ad706a0c27f9f
diff --git a/autotests/formattingtest.cpp b/autotests/formattingtest.cpp
index 8ed4422c..e5ec6f33 100644
--- a/autotests/formattingtest.cpp
+++ b/autotests/formattingtest.cpp
@@ -410,11 +410,11 @@ private Q_SLOTS:
const auto signedData = "signed data"_ba;
QByteArray signature;
- auto signJob{QGpgME::openpgp()->signJob(true, true)};
+ const std::unique_ptr<QGpgME::SignJob> signJob{QGpgME::openpgp()->signJob(true, true)};
auto signResult = signJob->exec({key}, signedData, GpgME::Detached, signature);
QVERIFY(!signResult.error());
- auto verifyJob{QGpgME::openpgp()->verifyDetachedJob(true)};
+ const std::unique_ptr<QGpgME::VerifyDetachedJob> verifyJob{QGpgME::openpgp()->verifyDetachedJob(true)};
const VerificationResult verificationResult = verifyJob->exec(signature, signedData);
QVERIFY(!verificationResult.error());
QCOMPARE(verificationResult.numSignatures(), 1);
diff --git a/sanitizers.supp b/sanitizers.supp
index 32f7f80e..3a30fcbb 100644
--- a/sanitizers.supp
+++ b/sanitizers.supp
@@ -14,3 +14,4 @@ leak:QObject::QObject
leak:QObjectPrivate::addConnection
leak:QObjectPrivate::connectImpl
leak:QPropertyAnimation::QPropertyAnimation
+leak:gpgme_op_verify_ext