mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
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.
This commit is contained in:
parent
372cc696d4
commit
75e8c8ed33
@ -2438,10 +2438,8 @@ static int _getsocks(char **args, char *payload, struct appctx *appctx, void *pr
|
||||
}
|
||||
|
||||
out:
|
||||
if (fd >= 0 && old_fcntl >= 0 && fcntl(fd, F_SETFL, old_fcntl) == -1) {
|
||||
if (fd >= 0 && old_fcntl >= 0 && fcntl(fd, F_SETFL, old_fcntl) == -1)
|
||||
ha_warning("Cannot make the unix socket non-blocking\n");
|
||||
goto out;
|
||||
}
|
||||
applet_set_eoi(appctx);
|
||||
appctx->st0 = CLI_ST_END;
|
||||
free(cmsgbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user