]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server: fix srv_drop() crash on partially init srv
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 14:07:51 +0000 (15:07 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 14:16:13 +0000 (15:16 +0100)
commita363b536a984b2fbc944a652a8b66f7c5bbc744e
treedc3431b8bc24b04043f2e6ca10739c15064269bd
parent6c08eb71738af42f93590d0cd59ffc077df485fa
BUG/MINOR: server: fix srv_drop() crash on partially init srv

A recent patch has introduced free operation for QUIC tokens stored in a
server. These values are located in <per_thr> server array.

However, a server instance may be released prior to its full
initialization in case of a failure during "add server" CLI command. The
mentionned patch would cause a srv_drop() crash due to an invalid usage
of NULL <per_thr> member.

Fix this by adding a check on <per_thr> prior to dereference it in
srv_drop().

No need to backport.
src/server.c