From 2ccc93c9dd97fec93b8306b8e4bf8f7e92a04304 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 18 Nov 2021 21:18:28 +0000 Subject: [PATCH] evptest: no need to call EVP_MD_CTX_cleanup() before EVP_MD_CTX_free() --- regress/lib/libcrypto/evp/evptest.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/regress/lib/libcrypto/evp/evptest.c b/regress/lib/libcrypto/evp/evptest.c index bb9564377c5..e6108de9821 100644 --- a/regress/lib/libcrypto/evp/evptest.c +++ b/regress/lib/libcrypto/evp/evptest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evptest.c,v 1.10 2021/11/18 15:15:31 tb Exp $ */ +/* $OpenBSD: evptest.c,v 1.11 2021/11/18 21:18:28 tb Exp $ */ /* Written by Ben Laurie, 2001 */ /* * Copyright (c) 2001 The OpenSSL Project. All rights reserved. @@ -296,7 +296,8 @@ test_digest(const char *digest, const unsigned char *plaintext, int pn, ERR_print_errors_fp(stderr); exit(101); } - EVP_MD_CTX_cleanup(ctx); + EVP_MD_CTX_free(ctx); + ctx = NULL; if (mdn != cn) { fprintf(stderr, "Digest length mismatch, got %d expected %d\n",mdn,cn); @@ -312,8 +313,6 @@ test_digest(const char *digest, const unsigned char *plaintext, int pn, printf("\n"); - EVP_MD_CTX_free(ctx); - return 1; } -- 2.20.1