summaryrefslogtreecommitdiff
path: root/regress/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2020-11-18 06:56:08 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2020-11-18 06:56:08 +0000
commit122f85c9b96e62a4d183d8d388a9f4b832e856ae (patch)
treed2eb334c30257d6e02bc329af2a3944b7dfd5ed0 /regress/lib/libcrypto
parenta3a19dfd862f00b08b80b57f755b3d438e53fb4b (diff)
Don't leak verify and store contexts.
Diffstat (limited to 'regress/lib/libcrypto')
-rw-r--r--regress/lib/libcrypto/x509/verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/x509/verify.c b/regress/lib/libcrypto/x509/verify.c
index added3bd9fd..9ef68cd5ab0 100644
--- a/regress/lib/libcrypto/x509/verify.c
+++ b/regress/lib/libcrypto/x509/verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: verify.c,v 1.4 2020/10/26 12:11:47 beck Exp $ */
+/* $OpenBSD: verify.c,v 1.5 2020/11/18 06:56:07 tb Exp $ */
/*
* Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -221,6 +221,8 @@ verify_cert_new(const char *roots_file, const char *bundle_file, int *chains)
sk_X509_pop_free(roots, X509_free);
sk_X509_pop_free(bundle, X509_free);
X509_free(leaf);
+ X509_STORE_CTX_free(xsc);
+ x509_verify_ctx_free(ctx);
}
struct verify_cert_test verify_cert_tests[] = {