summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-11-18 06:56:07 +0000
committertb <tb@openbsd.org>2020-11-18 06:56:07 +0000
commit047399e319222f295ecd4d6062a0d7e427dbcd21 (patch)
treeb3b9a006258972320fd9318140782cb5986c482f
parentadd imxiic(4); (diff)
downloadwireguard-openbsd-047399e319222f295ecd4d6062a0d7e427dbcd21.tar.xz
wireguard-openbsd-047399e319222f295ecd4d6062a0d7e427dbcd21.zip
Don't leak verify and store contexts.
-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[] = {