From 2b201c5c9dc2e2fd6afb94bf9b70a1d6482ba7d2 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 22 Aug 2016 22:21:30 +0100 Subject: [PATCH] Ensure CT_POLICY_EVAL_CTX_free behaves properly with a NULL arg Reviewed-by: Tim Hudson --- crypto/ct/ct_policy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c index 8bc9133fbf..33738de103 100644 --- a/crypto/ct/ct_policy.c +++ b/crypto/ct/ct_policy.c @@ -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); -- GitLab