From: Remi Tricot-Le Breton Date: Tue, 10 Jan 2023 10:21:40 +0000 (+0100) Subject: BUG/MINOR: ssl: Remove unneeded pointer check in ocsp cli release function X-Git-Tag: v2.8-dev2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71237a14572d7229957fb912e41b572ee06d8249;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 46dba88bd2..017f018373 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);