From: Christopher Faulet Date: Tue, 29 Mar 2022 12:17:09 +0000 (+0200) Subject: BUG/MINOR: log: Initialize the list element when allocating a new log server X-Git-Tag: v2.6-dev5~117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4f96eda561ce54a9147e86ad4bdb178b0b01311;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: Initialize the list element when allocating a new log server 211ea252d ("BUG/MINOR: logs: fix logsrv leaks on clean exit") introduced a regression because the list element of a new log server is not intialized. Thus HAProxy crashes on error path when an invalid log server is released. This patch shoud fix the issue #1636. It must be backported if the above commit is backported. For now, it is 2.6-specific and no backport is needed. --- diff --git a/src/log.c b/src/log.c index 744cb034f3..52cfece53f 100644 --- a/src/log.c +++ b/src/log.c @@ -842,7 +842,7 @@ int parse_logsrv(char **args, struct list *logsrvs, int do_del, const char *file memprintf(err, "out of memory"); goto error; } - + LIST_INIT(&logsrv->list); logsrv->conf.file = strdup(file); logsrv->conf.line = linenum;