From: Dr. Stephen Henson Date: Fri, 20 Dec 2013 15:12:26 +0000 (+0000) Subject: Ignore NULL parameter in EVP_MD_CTX_destroy. X-Git-Tag: OpenSSL_1_0_1f~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a6c62f0c25a756c263a80ce52afbae888028e986;p=oweals%2Fopenssl.git Ignore NULL parameter in EVP_MD_CTX_destroy. --- 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 */