diff options
author | beck <> | 2020-09-14 07:46:01 +0000 |
---|---|---|
committer | beck <> | 2020-09-14 07:46:01 +0000 |
commit | a6cea568b127c03f3420f698c0647e80bde07008 (patch) | |
tree | c16ebafcf7890477c9bdd833dfbcca97f2623575 | |
parent | b61a0e5a42ca1058268f147926d1a7cbca8cad5e (diff) | |
download | openbsd-a6cea568b127c03f3420f698c0647e80bde07008.tar.gz openbsd-a6cea568b127c03f3420f698c0647e80bde07008.tar.bz2 openbsd-a6cea568b127c03f3420f698c0647e80bde07008.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-- | src/lib/libcrypto/x509/x509_vfy.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index b1cc9b5a00..f076a1dc5c 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vfy.c,v 1.75 2020/09/13 15:06:17 beck Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.76 2020/09/14 07:46:01 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -682,7 +682,6 @@ X509_verify_cert(X509_STORE_CTX *ctx) | |||
682 | chain_count = x509_verify(vctx, NULL, NULL); | 682 | chain_count = x509_verify(vctx, NULL, NULL); |
683 | } | 683 | } |
684 | 684 | ||
685 | sk_X509_pop_free(roots, X509_free); | ||
686 | x509_verify_ctx_free(vctx); | 685 | x509_verify_ctx_free(vctx); |
687 | 686 | ||
688 | /* if we succeed we have a chain in ctx->chain */ | 687 | /* if we succeed we have a chain in ctx->chain */ |