BUG/MINOR: log: release global log servers on exit

Since 2.6 we have a free_logsrv() function that is used to release log
servers. It must be called from deinit() instead of manually iterating
over the log servers, otherwise some parts of the structure are not
freed (namely the ring name), as reported by ASAN.

This should be backported to 2.6.
This commit is contained in:
Willy Tarreau 2023-01-26 15:32:12 +01:00
parent 094ecf19f9
commit 2c701dbc07

View File

@ -2823,10 +2823,10 @@ void deinit(void)
idle_conn_task = NULL;
list_for_each_entry_safe(log, logb, &global.logsrvs, list) {
LIST_DELETE(&log->list);
free(log->conf.file);
free(log);
}
LIST_DEL_INIT(&log->list);
free_logsrv(log);
}
list_for_each_entry_safe(wl, wlb, &cfg_cfgfiles, list) {
free(wl->s);
LIST_DELETE(&wl->list);