]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: Remove unneeded pointer check in ocsp cli release function
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Tue, 10 Jan 2023 10:21:40 +0000 (11:21 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 11 Jan 2023 10:20:11 +0000 (11:20 +0100)
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

index 46dba88bd26a6abc8169535f8a8a17afdac607ac..017f018373609a8142ae2ae157f373ed6e5a45ac 100644 (file)
@@ -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);