summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_asn1.c')
-rw-r--r--src/lib/libcrypto/ec/ec_asn1.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c
index 2d7a1d4c3b..fb6a8e84c1 100644
--- a/src/lib/libcrypto/ec/ec_asn1.c
+++ b/src/lib/libcrypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_asn1.c,v 1.40 2022/11/26 16:08:52 tb Exp $ */ 1/* $OpenBSD: ec_asn1.c,v 1.41 2023/03/08 05:45:31 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -1236,7 +1236,7 @@ ec_asn1_parameters2group(const ECPARAMETERS *params)
1236 1236
1237 err: 1237 err:
1238 if (!ok) { 1238 if (!ok) {
1239 EC_GROUP_clear_free(ret); 1239 EC_GROUP_free(ret);
1240 ret = NULL; 1240 ret = NULL;
1241 } 1241 }
1242 BN_free(p); 1242 BN_free(p);
@@ -1299,7 +1299,7 @@ d2i_ECPKParameters(EC_GROUP ** a, const unsigned char **in, long len)
1299 } 1299 }
1300 1300
1301 if (a != NULL) { 1301 if (a != NULL) {
1302 EC_GROUP_clear_free(*a); 1302 EC_GROUP_free(*a);
1303 *a = group; 1303 *a = group;
1304 } 1304 }
1305 1305
@@ -1347,7 +1347,7 @@ d2i_ECPrivateKey(EC_KEY ** a, const unsigned char **in, long len)
1347 ret = *a; 1347 ret = *a;
1348 1348
1349 if (priv_key->parameters) { 1349 if (priv_key->parameters) {
1350 EC_GROUP_clear_free(ret->group); 1350 EC_GROUP_free(ret->group);
1351 ret->group = ec_asn1_pkparameters2group(priv_key->parameters); 1351 ret->group = ec_asn1_pkparameters2group(priv_key->parameters);
1352 } 1352 }
1353 if (ret->group == NULL) { 1353 if (ret->group == NULL) {
@@ -1371,7 +1371,7 @@ d2i_ECPrivateKey(EC_KEY ** a, const unsigned char **in, long len)
1371 } 1371 }
1372 1372
1373 if (ret->pub_key) 1373 if (ret->pub_key)
1374 EC_POINT_clear_free(ret->pub_key); 1374 EC_POINT_free(ret->pub_key);
1375 ret->pub_key = EC_POINT_new(ret->group); 1375 ret->pub_key = EC_POINT_new(ret->group);
1376 if (ret->pub_key == NULL) { 1376 if (ret->pub_key == NULL) {
1377 ECerror(ERR_R_EC_LIB); 1377 ECerror(ERR_R_EC_LIB);