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:32:25 +0000 |
commit | 560b34f2b016038209c7a67791613d0eb0381536 (patch) | |
tree | de18e5b923800071d1dd57de569635ce3fc24442 /crypto/evp/digest.c | |
parent | fc0503a25cd638b93f7af04640c20042e0329b3b (diff) | |
download | openssl-560b34f2b016038209c7a67791613d0eb0381536.tar.gz |
Ignore NULL parameter in EVP_MD_CTX_destroy.
(cherry picked from commit a6c62f0c25a756c263a80ce52afbae888028e986)
Diffstat (limited to 'crypto/evp/digest.c')
-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 982ba2b136..782d3199a5 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -344,8 +344,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 */ |