summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_print.c
diff options
context:
space:
mode:
authorjsing <>2023-03-08 05:45:31 +0000
committerjsing <>2023-03-08 05:45:31 +0000
commitf59a5e932baaa204327818534b8c93267c20bed0 (patch)
tree96a3d2dbc6ef11df6851b53d3d2e1c46dd7f2328 /src/lib/libcrypto/ec/ec_print.c
parent49f24f2af100d1cc94534c31f0db0ac8072ee4ac (diff)
downloadopenbsd-f59a5e932baaa204327818534b8c93267c20bed0.tar.gz
openbsd-f59a5e932baaa204327818534b8c93267c20bed0.tar.bz2
openbsd-f59a5e932baaa204327818534b8c93267c20bed0.zip
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@
Diffstat (limited to 'src/lib/libcrypto/ec/ec_print.c')
-rw-r--r--src/lib/libcrypto/ec/ec_print.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: ec_print.c,v 1.10 2023/03/07 09:27:10 jsing Exp $ */ 1/* $OpenBSD: ec_print.c,v 1.11 2023/03/08 05:45:31 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -110,7 +110,7 @@ EC_POINT_bn2point(const EC_GROUP *group,
110 110
111 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) { 111 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) {
112 if (point == NULL) 112 if (point == NULL)
113 EC_POINT_clear_free(ret); 113 EC_POINT_free(ret);
114 free(buf); 114 free(buf);
115 return NULL; 115 return NULL;
116 } 116 }