[pkg-opensc-commit] [engine-pkcs11] 137/152: tests: addressed few leaks in evp-sign
Eric Dorland
eric at moszumanska.debian.org
Mon Oct 19 03:11:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository engine-pkcs11.
commit 3ac3f7a4c0b493491ccd0197ea37c579a76ac3a8
Author: Nikos Mavrogiannopoulos <nmav at redhat.com>
Date: Wed Sep 16 16:20:40 2015 +0200
tests: addressed few leaks in evp-sign
---
tests/evp-sign.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/evp-sign.c b/tests/evp-sign.c
index 96947e8..a892967 100755
--- a/tests/evp-sign.c
+++ b/tests/evp-sign.c
@@ -138,7 +138,6 @@ int main(int argc, char **argv)
BIO_reset(b);
x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */
}
- BIO_free(b);
if (!x509) {
fprintf(stderr, "error loading cert %s\n", x509_name);
@@ -146,6 +145,8 @@ int main(int argc, char **argv)
}
pubkey = X509_get_pubkey(x509);
+ BIO_free(b);
+
/* Digest the module data. */
OpenSSL_add_all_digests();
display_openssl_errors(__LINE__);
@@ -193,6 +194,9 @@ int main(int argc, char **argv)
exit(1);
}
+ EVP_PKEY_free(pubkey);
+ EVP_PKEY_free(private_key);
+ ENGINE_finish(e);
CONF_modules_unload(1);
return 0;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/engine-pkcs11.git
More information about the pkg-opensc-commit
mailing list