From d2c2cc1a95a5bd151545a5500d98cfe0f34b5e30 Mon Sep 17 00:00:00 2001 From: beck <> Date: Mon, 14 Sep 2020 08:06:09 +0000 Subject: Correctly fix double free introduced on review. the roots for a ctx are only freed in the free function, not in the clear function, so that a ctx can be re-used with the same roots. ok tb@ --- src/lib/libcrypto/x509/x509_verify.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/libcrypto/x509/x509_verify.c') diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 5f5070c122..aeab03ffc2 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_verify.c,v 1.1 2020/09/13 15:06:17 beck Exp $ */ +/* $OpenBSD: x509_verify.c,v 1.2 2020/09/14 08:06:09 beck Exp $ */ /* * Copyright (c) 2020 Bob Beck * @@ -153,7 +153,6 @@ x509_verify_ctx_clear(struct x509_verify_ctx *ctx) { x509_verify_ctx_reset(ctx); sk_X509_pop_free(ctx->intermediates, X509_free); - sk_X509_pop_free(ctx->roots, X509_free); free(ctx->chains); memset(ctx, 0, sizeof(*ctx)); } -- cgit v1.2.3-55-g6feb