mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-09 16:09:47 +00:00
Fix memory leak on lookup failure
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4503)
This commit is contained in:
parent
c2976edf4b
commit
918a27facd
@ -129,6 +129,9 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
|
|||||||
pmeth = EVP_PKEY_meth_find(id);
|
pmeth = EVP_PKEY_meth_find(id);
|
||||||
|
|
||||||
if (pmeth == NULL) {
|
if (pmeth == NULL) {
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
ENGINE_finish(e);
|
||||||
|
#endif
|
||||||
EVPerr(EVP_F_INT_CTX_NEW, EVP_R_UNSUPPORTED_ALGORITHM);
|
EVPerr(EVP_F_INT_CTX_NEW, EVP_R_UNSUPPORTED_ALGORITHM);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user