From 71237a14572d7229957fb912e41b572ee06d8249 Mon Sep 17 00:00:00 2001 From: Remi Tricot-Le Breton Date: Tue, 10 Jan 2023 11:21:40 +0100 Subject: [PATCH] BUG/MINOR: ssl: Remove unneeded pointer check in ocsp cli release function The ctx pointer cannot be NULL so we can remove the check. This patch fixes GitHub issue #1996. It does not need to be backported. --- src/ssl_ocsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 46dba88..017f018 100644 --- a/src/ssl_ocsp.c +++ b/src/ssl_ocsp.c @@ -1432,8 +1432,7 @@ static void cli_release_update_ocsp_response(struct appctx *appctx) struct ocsp_cli_ctx *ctx = appctx->svcctx; struct httpclient *hc = ctx->hc; - if (ctx) - X509_free(ctx->ocsp_issuer); + X509_free(ctx->ocsp_issuer); /* Everything possible was printed on the CLI, we can destroy the client */ httpclient_stop_and_destroy(hc); -- 1.7.10.4