Ensure CT_POLICY_EVAL_CTX_free behaves properly with a NULL arg

Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
Matt Caswell 2016-08-22 22:21:30 +01:00
parent 2f3930bc0e
commit 2b201c5c9d

View file

@ -30,6 +30,8 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void)
void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx)
{
if (ctx == NULL)
return;
X509_free(ctx->cert);
X509_free(ctx->issuer);
OPENSSL_free(ctx);