summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-11-18 21:18:28 +0000
committertb <>2021-11-18 21:18:28 +0000
commitc8ac1dcb19accd865805022cc1230280d529f462 (patch)
treef523b51cf8ece75927fb878b97287023d3714935 /src
parent6e5c258fc17bbeef678a0be5be47f6bfaceba2a1 (diff)
downloadopenbsd-c8ac1dcb19accd865805022cc1230280d529f462.tar.gz
openbsd-c8ac1dcb19accd865805022cc1230280d529f462.tar.bz2
openbsd-c8ac1dcb19accd865805022cc1230280d529f462.zip
evptest: no need to call EVP_MD_CTX_cleanup() before EVP_MD_CTX_free()
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/evp/evptest.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/evp/evptest.c b/src/regress/lib/libcrypto/evp/evptest.c
index bb9564377c..e6108de982 100644
--- a/src/regress/lib/libcrypto/evp/evptest.c
+++ b/src/regress/lib/libcrypto/evp/evptest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evptest.c,v 1.10 2021/11/18 15:15:31 tb Exp $ */ 1/* $OpenBSD: evptest.c,v 1.11 2021/11/18 21:18:28 tb Exp $ */
2/* Written by Ben Laurie, 2001 */ 2/* Written by Ben Laurie, 2001 */
3/* 3/*
4 * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 4 * Copyright (c) 2001 The OpenSSL Project. All rights reserved.
@@ -296,7 +296,8 @@ test_digest(const char *digest, const unsigned char *plaintext, int pn,
296 ERR_print_errors_fp(stderr); 296 ERR_print_errors_fp(stderr);
297 exit(101); 297 exit(101);
298 } 298 }
299 EVP_MD_CTX_cleanup(ctx); 299 EVP_MD_CTX_free(ctx);
300 ctx = NULL;
300 301
301 if (mdn != cn) { 302 if (mdn != cn) {
302 fprintf(stderr, "Digest length mismatch, got %d expected %d\n",mdn,cn); 303 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,
312 313
313 printf("\n"); 314 printf("\n");
314 315
315 EVP_MD_CTX_free(ctx);
316
317 return 1; 316 return 1;
318} 317}
319 318