Fix memory leak: free up ENGINE functional reference if digest is not
found in an ENGINE.
This commit is contained in:
parent
3b3f71121b
commit
07973d5db8
@ -175,6 +175,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
|||||||
{
|
{
|
||||||
/* Same comment from evp_enc.c */
|
/* Same comment from evp_enc.c */
|
||||||
EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR);
|
EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR);
|
||||||
|
ENGINE_finish(impl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* We'll use the ENGINE's private digest definition */
|
/* We'll use the ENGINE's private digest definition */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user