]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: tcpcheck: Release temporary small chunk when retrying on http-check
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Apr 2026 07:56:06 +0000 (09:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Apr 2026 08:49:24 +0000 (10:49 +0200)
When a http request is sent during an http healthcheck, if an error is
triggered while the output buffer is a small buffer, another attempt is made
with a larger one. When this happens, the temporary chunk used to format
headers must be released.

No backport needed.

src/tcpcheck.c

index 28ffd8c74696fd19b48e094bc7c0a6bc67878073..5331619f126ea12d1a59713f7713258f5cf25d59 100644 (file)
@@ -1849,6 +1849,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_send(struct check *check, struct tcpcheck_r
                htx_to_buf(htx, &check->bo);
        }
        if (b_is_small(&check->bo)) {
+               free_trash_chunk(tmp);
                check->state &= ~CHK_ST_USE_SMALL_BUFF;
                check_release_buf(check, &check->bo);
                TRACE_DEVEL("Send fail with small buffer retry with default one", CHK_EV_TCPCHK_SND|CHK_EV_TX_DATA, check);