BUG/MEDIUM: peers: Handle mux creation failure.
If the mux fails to properly be created by conn_install_mux, fail, instead
of silently ignoring it.
This should be backported to 1.9.
diff --git a/src/peers.c b/src/peers.c
index bca56aa..30cf942 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -2314,7 +2314,8 @@
memcpy(&conn->addr.to, &peer->addr, sizeof(conn->addr.to));
conn_prepare(conn, peer->proto, peer_xprt(peer));
- conn_install_mux(conn, &mux_pt_ops, cs, s->be, NULL);
+ if (conn_install_mux(conn, &mux_pt_ops, cs, s->be, NULL) < 0)
+ goto out_free_cs;
si_attach_cs(&s->si[1], cs);
s->do_log = NULL;
@@ -2328,6 +2329,8 @@
return appctx;
/* Error unrolling */
+out_free_cs:
+ cs_free(cs);
out_free_conn:
conn_free(conn);
out_free_strm: