BUG/MINOR: fd: always remove late updates when freeing fd_updt[]

Christopher found that since commit 8e2c0fa8e ("MINOR: fd: delete unused
updates on close()") we may crash in a late stop due to an fd_delete()
in the main thread performed after all threads have deleted the fd_updt[]
array. Prior to that commit that didn't happen because we didn't touch
the updates on this path, but now it may happen. We don't care about these
ones anyway since the poller is stopped, so let's just wipe them by
resetting their counter before freeing the array.

No backport is needed as this is only 2.7.
This commit is contained in:
Willy Tarreau 2022-07-26 19:06:17 +02:00
parent c31577f32e
commit b983145837

View File

@ -984,6 +984,7 @@ static void deinit_pollers_per_thread()
/* Release the pollers per thread, to be called late */
static void free_pollers_per_thread()
{
fd_nbupdt = 0;
ha_free(&fd_updt);
}