]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: Don't destroy the h2s if it still has a cs attached.
authorOlivier Houchard <cognet@ci0.org>
Sun, 16 Dec 2018 00:29:11 +0000 (01:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 16 Dec 2018 07:22:01 +0000 (08:22 +0100)
In h2_deferred_shut, if we're done sending the shutr/shutw, don't destroy
the h2s if it still has a conn_stream attached, or the conn_stream may try
to access it again.

src/mux_h2.c

index 6403b020c24f806e1152d72725f50601145aa3c9..dc28b12d065b1900526d9e522aaa3f77de046212 100644 (file)
@@ -3016,7 +3016,7 @@ static struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short s
                h2_do_shutr(h2s);
 
        if (h2s->st == H2_SS_CLOSED &&
-           !((h2s->flags & (H2_SF_BLK_MBUSY | H2_SF_BLK_MROOM | H2_SF_BLK_MFCTL))))
+           !((h2s->flags & (H2_SF_BLK_MBUSY | H2_SF_BLK_MROOM | H2_SF_BLK_MFCTL))) && !h2s->cs)
                h2s_destroy(h2s);
        return NULL;
 }