]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acme: acme_ctx_destroy() returns upon NULL
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 30 Apr 2025 15:17:58 +0000 (17:17 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 30 Apr 2025 15:17:58 +0000 (17:17 +0200)
acme_ctx_destroy() returns when its argument is NULL.

src/acme.c

index 6897952b2d77b8ca19589d763533fbfc43256227..d7dbd3a8a1b63b421a363f76dd8f44486109fcd4 100644 (file)
@@ -591,6 +591,9 @@ static void acme_ctx_destroy(struct acme_ctx *ctx)
 {
        struct acme_auth *auth;
 
+       if (!ctx)
+               return;
+
        istfree(&ctx->ressources.newNonce);
        istfree(&ctx->ressources.newAccount);
        istfree(&ctx->ressources.newOrder);