From e39827de0d6798d0ce2a88e59dd7b312d367a898 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 16 Dec 2021 16:10:39 +0100 Subject: [PATCH] MINOR: stream-int: Be able to allocate a CS without connection si_alloc_cs() function may now be called without connection. It is mandatory to allocate the backend conn-stream during the stream creation. --- include/haproxy/stream_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h index acc22e756..da07127ff 100644 --- a/include/haproxy/stream_interface.h +++ b/include/haproxy/stream_interface.h @@ -427,7 +427,7 @@ static inline struct conn_stream *si_alloc_cs(struct stream_interface *si, struc si_release_endpoint(si); - cs = cs_new(conn, conn->target); + cs = cs_new(conn, (conn ? conn->target : NULL)); if (cs) si_attach_cs(si, cs);