Fix coverity finding
Coverity ID: 1643094 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26831)
This commit is contained in:
parent
a1c6e2d1b5
commit
c152a94395
1 changed files with 6 additions and 1 deletions
|
@ -116,8 +116,13 @@ static void *skeymgmt_from_algorithm(int name_id,
|
|||
ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ossl_provider_up_ref(prov)) {
|
||||
EVP_SKEYMGMT_free(skeymgmt);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
skeymgmt->prov = prov;
|
||||
ossl_provider_up_ref(prov);
|
||||
|
||||
return skeymgmt;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue