diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-12-20 15:12:26 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-12-20 23:24:26 +0000 |
commit | ff64ab32aef676020abb1097c2ca17cef106b9de (patch) | |
tree | 23da5362741ff52600d3313a1928240b0deef2f3 /crypto/evp | |
parent | fc9c9e47f7165eb24e3f07eb69efc490cce9152c (diff) |
Ignore NULL parameter in EVP_MD_CTX_destroy.
(cherry picked from commit a6c62f0c25a756c263a80ce52afbae888028e986)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/digest.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index cfd5401dbd..87317572fe 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -379,8 +379,11 @@ int EVP_Digest(const void *data, size_t count, void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) { - EVP_MD_CTX_cleanup(ctx); - OPENSSL_free(ctx); + if (ctx) + { + EVP_MD_CTX_cleanup(ctx); + OPENSSL_free(ctx); + } } /* This call frees resources associated with the context */ |