aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-03-05 13:33:21 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-03-05 13:33:21 +0000
commit8c4ce7bab2dd880696d78f19336e3cabacbccb4a (patch)
tree54936897296021a8bd420037ca2f20cae0a84d39 /crypto/evp/digest.c
parentbb845ee044587a91589357a772a02cffb0ba4454 (diff)
downloadopenssl-8c4ce7bab2dd880696d78f19336e3cabacbccb4a.tar.gz
Fix memory leak: free up ENGINE functional reference if digest is not
found in an ENGINE.
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c1
1 files changed, 1 insertions, 0 deletions
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 */