Ignore NULL parameter in EVP_MD_CTX_destroy.

This commit is contained in:
Dr. Stephen Henson 2013-12-20 15:12:26 +00:00
parent ca989269a2
commit a6c62f0c25

View file

@ -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 */