[Pkg-gnupg-commit] [gpgme] 27/62: tests: Fix additional memleaks in thread tests
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Nov 19 04:03:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit d0030efb45ec8436dd84a9623d2f66b80c6b9e10
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Nov 10 15:04:17 2016 +0100
tests: Fix additional memleaks in thread tests
* tests/gpg/t-thread-keylist-verify.c (start_verify): Release
data.
(start_keylist): Unref keys.
* tests/gpg/t-thread-keylist.c (start_keylist): Unref keys.
---
tests/gpg/t-thread-keylist-verify.c | 7 ++++++-
tests/gpg/t-thread-keylist.c | 5 ++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/gpg/t-thread-keylist-verify.c b/tests/gpg/t-thread-keylist-verify.c
index c77d6da..9f37857 100644
--- a/tests/gpg/t-thread-keylist-verify.c
+++ b/tests/gpg/t-thread-keylist-verify.c
@@ -60,7 +60,10 @@ start_keylist (void *arg)
err = gpgme_op_keylist_start (ctx, NULL, 0);
fail_if_err (err);
- while (!(err = gpgme_op_keylist_next (ctx, &key)));
+ while (!(err = gpgme_op_keylist_next (ctx, &key)))
+ {
+ gpgme_key_unref (key);
+ }
gpgme_release (ctx);
return NULL;
@@ -103,6 +106,8 @@ start_verify (void *arg)
__FILE__, __LINE__, gpgme_strerror (signature->status));
exit (1);
}
+ gpgme_free (text);
+ gpgme_free (sig);
gpgme_release (ctx);
return NULL;
}
diff --git a/tests/gpg/t-thread-keylist.c b/tests/gpg/t-thread-keylist.c
index d585bf4..6b9cee0 100644
--- a/tests/gpg/t-thread-keylist.c
+++ b/tests/gpg/t-thread-keylist.c
@@ -48,7 +48,10 @@ start_keylist (void *arg)
err = gpgme_op_keylist_start (ctx, NULL, 0);
fail_if_err (err);
- while (!(err = gpgme_op_keylist_next (ctx, &key)));
+ while (!(err = gpgme_op_keylist_next (ctx, &key)))
+ {
+ gpgme_key_unref (key);
+ }
gpgme_release (ctx);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list