提交 560b34f2 编写于 作者: D Dr. Stephen Henson

Ignore NULL parameter in EVP_MD_CTX_destroy.

(cherry picked from commit a6c62f0c25a756c263a80ce52afbae888028e986)
上级 fc0503a2
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册