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 22:53:38 +0000 |
commit | 1f7732bca214229896f6de8e725414d6529838b0 (patch) | |
tree | 9ea2947d0240a1112f9dba92edc714b9560c0094 | |
parent | fec613dcf2e1487fd7c009eb7b58979abbd98fa6 (diff) |
Ignore NULL parameter in EVP_MD_CTX_destroy.
(cherry picked from commit a6c62f0c25a756c263a80ce52afbae888028e986)
-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 */ |