BUG/MINOR: cli: Fix a possible infinite loop in _getsocks()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2025 14:37:52 +0000 (15:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Mar 2025 14:58:40 +0000 (15:58 +0100)
commit593611dd0bceb8f14158dd7c0a1b120c78557ff1
treed30e55aa10eaeadcdb8237cad5d9e4e70931e848
parentcbe470f5f42eac4295fb105cb9b2719346606ff1
BUG/MINOR: cli: Fix a possible infinite loop in _getsocks()

In _getsocks() functuoin, when we failed to set the unix socket in
non-blocking mode, a goto to "out" label led to loop infinitly. To fix the
issue, we must only let the function exit.

This patch should be backported to all stable versions.

(cherry picked from commit 75e8c8ed330f2ad1b6b33630efebb5041af3d5e9)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 48022892602a61ed695aad552a0dcda4457308c2)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
src/cli.c