From: Olivier Houchard Date: Fri, 28 Dec 2018 13:45:47 +0000 (+0100) Subject: BUG/MEDIUM: servers: Fail if we fail to allocate a conn_stream. X-Git-Tag: v2.0-dev1~314 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=134a2045bbae1de2dd267928367a1445e966013d;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: servers: Fail if we fail to allocate a conn_stream. If, for some reason we failed to allocate a conn_stream when reusing an existing connection, set srv_conn to NULL, so that we fail later, instead of pretending all is right. This ends up giving a stream_interface with no endpoint, and so the stream will never end. This should be backported to 1.9. --- diff --git a/src/backend.c b/src/backend.c index bc38c57104..d52f484cb6 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1278,6 +1278,8 @@ int connect_server(struct stream *s) srv_cs = srv_conn->mux->attach(srv_conn, s->sess); if (srv_cs) si_attach_cs(&s->si[1], srv_cs); + else + srv_conn = NULL; } } if (srv_conn && old_conn != srv_conn) {