mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 22:31:06 +01:00
BUG/MEDIUM: mux-h2: fix crash when checking for reverse connection after error
If the connection is closed in h2_release(), which is indicated by ret<0, we
must not dereference conn anymore. This was introduced in 2.9-dev4 by commit
5053e8914 ("MEDIUM: h2: prevent stream opening before connection reverse
completed") and detected after a few hours of runtime thanks to running with
pool integrity checks and caller enabled. No backport is needed.
This commit is contained in:
parent
518349f08a
commit
a7b9baa2cc
@ -4257,7 +4257,7 @@ static int h2_wake(struct connection *conn)
|
||||
|
||||
TRACE_ENTER(H2_EV_H2C_WAKE, conn);
|
||||
ret = h2_process(h2c);
|
||||
if (ret >= 0)
|
||||
if (ret >= 0) {
|
||||
h2_wake_some_streams(h2c, 0);
|
||||
|
||||
/* For active reverse connection, an explicit check is required if an
|
||||
@ -4269,6 +4269,7 @@ static int h2_wake(struct connection *conn)
|
||||
TRACE_DEVEL("leaving and killing dead connection", H2_EV_STRM_END, h2c->conn);
|
||||
h2_release(h2c);
|
||||
}
|
||||
}
|
||||
|
||||
TRACE_LEAVE(H2_EV_H2C_WAKE);
|
||||
return ret;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user