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:52:41 +0000 |
commit | a6c62f0c25a756c263a80ce52afbae888028e986 (patch) | |
tree | cb672938b7cf026a4d319770032ca6a920c184eb /crypto | |
parent | ca989269a2876bae79393bd54c3e72d49975fc75 (diff) |
Ignore NULL parameter in EVP_MD_CTX_destroy.
Diffstat (limited to 'crypto')
-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 6fc469f9c4..d14e8e48d5 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -366,8 +366,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 */ |