]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acme: use acme_ctx_destroy() upon error
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 30 Apr 2025 15:18:46 +0000 (17:18 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 30 Apr 2025 15:18:46 +0000 (17:18 +0200)
Use acme_ctx_destroy() instead of a simple free() upon error in the
"acme renew" error handling.

It's better to use this function to be sure than everything has been
been freed.

src/acme.c

index d7dbd3a8a1b63b421a363f76dd8f44486109fcd4..cb993026fea479a4d086665dea8644c1664b3a35 100644 (file)
@@ -2196,7 +2196,7 @@ err:
        HA_SPIN_UNLOCK(CKCH_LOCK, &ckch_lock);
        EVP_PKEY_free(pkey);
        ckch_store_free(newstore);
-       free(ctx);
+       acme_ctx_destroy(ctx);
        memprintf(&err, "%sCan't start the ACME client.\n", err ? err : "");
        return cli_dynerr(appctx, err);
 }