mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
BUG/MEDIUM: logs: Only attempt to free startup_logs once.
deinit_log_buffers() can be called once per thread, however startup_logs is common to all threads. So only attempt to free it once. This should be backported to 1.9 and 1.8.
This commit is contained in:
parent
0cf33176bd
commit
7c49711d60
1 changed files with 5 additions and 1 deletions
|
|
@ -1692,11 +1692,15 @@ int init_log_buffers()
|
|||
/* Deinitialize log buffers used for syslog messages */
|
||||
void deinit_log_buffers()
|
||||
{
|
||||
void *tmp_startup_logs;
|
||||
|
||||
free(logheader);
|
||||
free(logheader_rfc5424);
|
||||
free(logline);
|
||||
free(logline_rfc5424);
|
||||
free(startup_logs);
|
||||
tmp_startup_logs = HA_ATOMIC_XCHG(&startup_logs, NULL);
|
||||
free(tmp_startup_logs);
|
||||
|
||||
logheader = NULL;
|
||||
logheader_rfc5424 = NULL;
|
||||
logline = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue