From: Christopher Faulet Date: Thu, 16 Dec 2021 15:10:39 +0000 (+0100) Subject: MINOR: stream-int: Be able to allocate a CS without connection X-Git-Tag: v2.6-dev2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e39827de0d6798d0ce2a88e59dd7b312d367a898;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h index acc22e756c..da07127ffc 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);