diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index bbf5fee8..3652ba51 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -127,6 +127,7 @@ err1: EC_KEY *EC_KEY_new_by_curve_name(int nid) { EC_KEY *ret = EC_KEY_new(); if (ret == NULL) { + OPENSSL_PUT_ERROR(EC, EC_KEY_new_by_curve_name, ERR_R_MALLOC_FAILURE); return NULL; } ret->group = EC_GROUP_new_by_curve_name(nid); diff --git a/crypto/evp/p_ec_asn1.c b/crypto/evp/p_ec_asn1.c index 1fe41e72..fbbf4e73 100644 --- a/crypto/evp/p_ec_asn1.c +++ b/crypto/evp/p_ec_asn1.c @@ -147,7 +147,6 @@ static EC_KEY *eckey_type2param(int ptype, void *pval) { * by an asn1 OID */ eckey = EC_KEY_new_by_curve_name(OBJ_obj2nid(poid)); if (eckey == NULL) { - OPENSSL_PUT_ERROR(EVP, eckey_type2param, ERR_R_MALLOC_FAILURE); goto err; } } else { diff --git a/include/openssl/ec.h b/include/openssl/ec.h index aeb2285f..633b11b4 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -380,6 +380,7 @@ OPENSSL_EXPORT void EC_GROUP_set_point_conversion_form( #define EC_F_ec_GFp_nistp256_points_mul 162 #define EC_F_ec_group_copy 163 #define EC_F_nistp256_pre_comp_new 164 +#define EC_F_EC_KEY_new_by_curve_name 165 #define EC_R_BUFFER_TOO_SMALL 100 #define EC_R_COORDINATES_OUT_OF_RANGE 101 #define EC_R_D2I_ECPKPARAMETERS_FAILURE 102