mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
fix coverity 1466710: resource leak
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14620)
This commit is contained in:
parent
fd0a9ff7ef
commit
09fba0b440
@ -900,13 +900,13 @@ int ec_validate(const void *keydata, int selection, int checktype)
|
||||
if (!ossl_prov_is_running())
|
||||
return 0;
|
||||
|
||||
if ((selection & EC_POSSIBLE_SELECTIONS) == 0)
|
||||
return 1; /* nothing to validate */
|
||||
|
||||
ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eck));
|
||||
if (ctx == NULL)
|
||||
return 0;
|
||||
|
||||
if ((selection & EC_POSSIBLE_SELECTIONS) == 0)
|
||||
return 1; /* nothing to validate */
|
||||
|
||||
if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
|
||||
int flags = EC_KEY_get_flags(eck);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user