From f59a5e932baaa204327818534b8c93267c20bed0 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 8 Mar 2023 05:45:31 +0000 Subject: Always clear EC groups and points on free. Rather than sometimes clearing, turn the free functions into ones that always clear (as we've done elsewhere). Turn the EC_GROUP_clear_free() and EC_POINT_clear_free() functions into wrappers that call the *_free() version. Do similar for the EC_METHOD implementations, removing the group_clear_finish() and point_clear_finish() hooks in the process. ok tb@ --- src/lib/libcrypto/ec/ec_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/ec/ec_print.c') diff --git a/src/lib/libcrypto/ec/ec_print.c b/src/lib/libcrypto/ec/ec_print.c index faa212f502..2aa0aa66a9 100644 --- a/src/lib/libcrypto/ec/ec_print.c +++ b/src/lib/libcrypto/ec/ec_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_print.c,v 1.10 2023/03/07 09:27:10 jsing Exp $ */ +/* $OpenBSD: ec_print.c,v 1.11 2023/03/08 05:45:31 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -110,7 +110,7 @@ EC_POINT_bn2point(const EC_GROUP *group, if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) { if (point == NULL) - EC_POINT_clear_free(ret); + EC_POINT_free(ret); free(buf); return NULL; } -- cgit v1.2.3-55-g6feb