From: Dr. Stephen Henson Date: Fri, 5 Mar 2010 13:35:06 +0000 (+0000) Subject: Fix memory leak: free up ENGINE functional reference if digest is not X-Git-Tag: OpenSSL_0_9_8n~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1939f8370929280578f8daabf10c10b1fac6f0e0;p=oweals%2Fopenssl.git 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 6a8f39bef7..10a36071f7 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -235,6 +235,7 @@ static int do_evp_md_engine(EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl) { /* Same comment from evp_enc.c */ EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */