From: Willy Tarreau Date: Thu, 23 Apr 2026 13:10:01 +0000 (+0200) Subject: BUG/MINOR: server: fix a possible leak of an error message in dynamic servers X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=5a59b158ff615b33b0ce7a1c550590554a396ec2;p=thirdparty%2Fhaproxy.git BUG/MINOR: server: fix a possible leak of an error message in dynamic servers In 3.4-dev6, commit de5fc2f515 ("BUG/MINOR: server: set auto SNI for dynamic servers") allowed to properly set the SNI, and return an error message. However the error message is leaked after being printed on the CLI. This should be backported to 3.3. --- diff --git a/src/server.c b/src/server.c index bf8241b79..88a05288e 100644 --- a/src/server.c +++ b/src/server.c @@ -6296,6 +6296,7 @@ static int cli_parse_add_server(char **args, char *payload, struct appctx *appct !srv->sni_expr && !(srv->ssl_ctx.options & SRV_SSL_O_NO_AUTO_SNI)) { if (srv_configure_auto_sni(srv, &errcode, &errmsg)) { ha_alert("%s.\n", errmsg); + ha_free(&errmsg); goto out; } }