summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2020-07-15 03:44:43 +0000
committerBob Beck <beck@cvs.openbsd.org>2020-07-15 03:44:43 +0000
commite5e6cbe586e985f846f866608109a6777cadf2f9 (patch)
tree2c2512a39c91abaa6c69e79063c4b8709fd70205
parent02445cf42141c4c37eda1546b39c912beceb29d2 (diff)
Don't leak the X509_STORE
-rw-r--r--regress/lib/libcrypto/x509/bettertls/verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/x509/bettertls/verify.c b/regress/lib/libcrypto/x509/bettertls/verify.c
index 801f1935331..c23e8a2db98 100644
--- a/regress/lib/libcrypto/x509/bettertls/verify.c
+++ b/regress/lib/libcrypto/x509/bettertls/verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: verify.c,v 1.1 2020/07/15 03:12:42 beck Exp $ */
+/* $OpenBSD: verify.c,v 1.2 2020/07/15 03:44:42 beck Exp $ */
/*
* Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -174,6 +174,8 @@ verify_cert(const char *roots_file, const char *bundle_file,
sk_X509_pop_free(roots, X509_free);
sk_X509_pop_free(bundle, X509_free);
sk_X509_pop_free(cert, X509_free);
+ X509_STORE_free(store);
+ X509_STORE_free(storeip);
X509_STORE_CTX_free(xsc);
X509_STORE_CTX_free(xscip);
X509_free(leaf);