]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: conn-stream: Use unsafe functions to get conn/appctx in cs_detach_endp
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 14 Apr 2022 09:40:12 +0000 (11:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 14 Apr 2022 09:57:06 +0000 (11:57 +0200)
There is no reason to rely on safe functions here. This patch should fix the
issue #1656.

src/conn_stream.c

index 7adf04b5b7273fab37244a826548755d4e1dea3e..2a3ff564ad750f1ae116520acf2fe405dcf9764d 100644 (file)
@@ -350,7 +350,7 @@ void cs_detach_endp(struct conn_stream *cs)
                goto reset_cs;
 
        if (cs->endp->flags & CS_EP_T_MUX) {
-               struct connection *conn = cs_conn(cs);
+               struct connection *conn = __cs_conn(cs);
 
                if (conn->mux) {
                        /* TODO: handle unsubscribe for healthchecks too */
@@ -372,7 +372,7 @@ void cs_detach_endp(struct conn_stream *cs)
                }
        }
        else if (cs->endp->flags & CS_EP_T_APPLET) {
-               struct appctx *appctx = cs_appctx(cs);
+               struct appctx *appctx = __cs_appctx(cs);
 
                cs->endp->flags |= CS_EP_ORPHAN;
                cs_applet_release(cs);