MINOR: acme: use acme_ctx_destroy() upon error

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.
This commit is contained in:
William Lallemand 2025-04-30 17:18:46 +02:00
parent b8a5270334
commit 6462f183ad

View File

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