mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
BUG/MEDIUM: deinit: check fdtab before fdtab[fd].owner
When running a pure config check (haproxy -c) we go through the deinit phase without having allocated fdtab, so we can't blindly dereference it. The issue was added by recent commit ae7bc4a23 ("MEDIUM: deinit: close all receivers/listeners before scanning proxies"), no backport is needed.
This commit is contained in:
parent
2f6f362756
commit
1a3770cbc7
@ -2452,7 +2452,7 @@ void deinit(void)
|
||||
protocol_unbind_all();
|
||||
|
||||
for (cur_fd = 0; cur_fd < global.maxsock; cur_fd++) {
|
||||
if (!fdtab[cur_fd].owner)
|
||||
if (!fdtab || !fdtab[cur_fd].owner)
|
||||
continue;
|
||||
|
||||
if (fdtab[cur_fd].iocb == listener_accept) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user