From: Dr. Stephen Henson Date: Fri, 5 Mar 2010 13:33:21 +0000 (+0000) Subject: Fix memory leak: free up ENGINE functional reference if digest is not X-Git-Tag: OpenSSL-fips-2_0-rc1~1224 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c4ce7bab2dd880696d78f19336e3cabacbccb4a;p=openssl Fix memory leak: free up ENGINE functional reference if digest is not found in an ENGINE. --- diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index bd520456b1..982ba2b136 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -175,6 +175,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) { /* Same comment from evp_enc.c */ EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */