On 1/9/19 6:06 AM, Willy Tarreau wrote:
On Wed, Jan 09, 2019 at 11:54:36AM +0100, Olivier Houchard wrote:
Oops, that seems right, and the patch looks fine, Willy can you push it ?
Sure. Daniel, may I put your real name or do you want to resubmit the
patch ? We usually don't take patches using aliases only for the author.


Sure -- attached you will find the new patch with the updated details.

-- Daniel
>From 13b37d5366be36535b3c67242ae0ac328e3aaaf8 Mon Sep 17 00:00:00 2001
From: Daniel Corbett <dcorb...@haproxy.com>
Date: Wed, 9 Jan 2019 08:13:29 -0500
Subject: [PATCH] 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.
 src/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server.c b/src/server.c
index 4cd8784..bc9e805 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1936,7 +1936,7 @@ static int server_finalize_init(const char *file, int linenum, char **args, int
-	if (!srv->tmpl_info.prefix && srv->max_idle_conns != 0) {
+	if (srv->max_idle_conns != 0) {
 			int i;
 			srv->idle_orphan_conns = calloc(global.nbthread, sizeof(*srv->idle_orphan_conns));

Reply via email to