]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: errors: print_message: don't allocate startup logs ring
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 28 Oct 2024 14:17:11 +0000 (15:17 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 29 Oct 2024 17:17:49 +0000 (18:17 +0100)
commitf0f03b98f773cbf902bed59d0a3008c60fce8a06
tree2e6d34f86437370bbd7ef50d419de2ede15625be
parentbf8c871e26c226a7c0bdbf6afe9a9bd8398c4f5d
BUG/MINOR: errors: print_message: don't allocate startup logs ring

Don't call startup_logs_init() in order to allocate the startup logs ring
again, if startup_logs pointer is NULL. Startup logs ring is allocated
explicitly in step_init_1 routine, when the process starts, and it's freed
explicitly for master process at the end of mworker_reexec scope. So, when
we no longer have this pointer, let's just save the log message in the
message buffer.

Otherwise, in case of master process, we will allocate the startup logs ring
again here and we will lost its address after execvp.

No need to backport this fix as it's related to the latest master-worker
refactoring.
src/errors.c