BUG/MEDIUM: tcpcheck: Release temporary small chunk when retrying on http-check

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.
This commit is contained in:
Christopher Faulet 2026-04-23 09:56:06 +02:00
parent 03da32bbff
commit cf9694474b

View 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);