Ignore NULL parameter in EVP_MD_CTX_destroy.
(cherry picked from commit a6c62f0c25a756c263a80ce52afbae888028e986)
This commit is contained in:
parent
fc9c9e47f7
commit
ff64ab32ae
@ -378,10 +378,13 @@ int EVP_Digest(const void *data, size_t count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
|
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
|
||||||
|
{
|
||||||
|
if (ctx)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX_cleanup(ctx);
|
EVP_MD_CTX_cleanup(ctx);
|
||||||
OPENSSL_free(ctx);
|
OPENSSL_free(ctx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* This call frees resources associated with the context */
|
/* This call frees resources associated with the context */
|
||||||
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
|
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user