summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2020-09-14 07:46:01 +0000
committerbeck <beck@openbsd.org>2020-09-14 07:46:01 +0000
commita60eabd3383e086582a5de5bcc26bc5e0774efce (patch)
treeb31a525d3e832e50e5326eade46c487b1d51b5b9
parentrevert previous, need to fix a problem (diff)
downloadwireguard-openbsd-a60eabd3383e086582a5de5bcc26bc5e0774efce.tar.xz
wireguard-openbsd-a60eabd3383e086582a5de5bcc26bc5e0774efce.zip
Fix double free - review moved the pop_free of roots to x509_verify_ctx_free
so we don't need to pop free the roots separately
-rw-r--r--lib/libcrypto/x509/x509_vfy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/x509/x509_vfy.c b/lib/libcrypto/x509/x509_vfy.c
index b1cc9b5a007..f076a1dc5c9 100644
--- a/lib/libcrypto/x509/x509_vfy.c
+++ b/lib/libcrypto/x509/x509_vfy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_vfy.c,v 1.75 2020/09/13 15:06:17 beck Exp $ */
+/* $OpenBSD: x509_vfy.c,v 1.76 2020/09/14 07:46:01 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -682,7 +682,6 @@ X509_verify_cert(X509_STORE_CTX *ctx)
chain_count = x509_verify(vctx, NULL, NULL);
}
- sk_X509_pop_free(roots, X509_free);
x509_verify_ctx_free(vctx);
/* if we succeed we have a chain in ctx->chain */