mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: init: Initialize idle_orphan_conns for first server in server-template
When initializing server-template all of the servers after the first have srv->idle_orphan_conns initialized within server_template_init() The first server does not have this initialized and when http-reuse is active this causes a segmentation fault when accessed from srv_add_to_idle_list(). This patch removes the check for srv->tmpl_info.prefix within server_finalize_init() and allows the first server within a server-template to have srv->idle_orphan_conns properly initialized. This should be backported to 1.9.
This commit is contained in:
parent
4dc3f3b4bb
commit
43bb842a08
@ -1936,7 +1936,7 @@ static int server_finalize_init(const char *file, int linenum, char **args, int
|
|||||||
px->srv_act++;
|
px->srv_act++;
|
||||||
srv_lb_commit_status(srv);
|
srv_lb_commit_status(srv);
|
||||||
|
|
||||||
if (!srv->tmpl_info.prefix && srv->max_idle_conns != 0) {
|
if (srv->max_idle_conns != 0) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
srv->idle_orphan_conns = calloc(global.nbthread, sizeof(*srv->idle_orphan_conns));
|
srv->idle_orphan_conns = calloc(global.nbthread, sizeof(*srv->idle_orphan_conns));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user