From: Amaury Denoyelle Date: Fri, 6 Dec 2024 15:47:53 +0000 (+0100) Subject: MINOR: mux-h1: use explicit __objt_server on idle conn reinsert X-Git-Tag: v3.2-dev1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ece3bf65ca29e914a2c3b2aad643a09e39bb77c3;p=thirdparty%2Fhaproxy.git MINOR: mux-h1: use explicit __objt_server on idle conn reinsert When dealing with a backend connection, H1 mux IO handler must reinsert it in its idle list pool if it was extracted from it at the beginning. This is the case if conn_in_list is true. On reinsert, idle list pool is retrieved via the server instance accessible from . Replace objt_server usage with __objt_server as an idle connection is always attached to a server. This ensures that there is no issue when using _srv_add_idle() then. This should fix coverity report from github issue #2810. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 734d0627b7..7eb18133dd 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -4252,7 +4252,7 @@ struct task *h1_io_cb(struct task *t, void *ctx, unsigned int state) t = NULL; if (!ret && conn_in_list) { - struct server *srv = objt_server(conn->target); + struct server *srv = __objt_server(conn->target); HA_SPIN_LOCK(IDLE_CONNS_LOCK, &idle_conns[tid].idle_conns_lock); _srv_add_idle(srv, conn, conn_in_list == CO_FL_SAFE_LIST);