mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-27 04:43:37 -04:00
BUG/MAJOR: mux-h2: don't wake streams after connection was destroyed
In commit 477902b ("MEDIUM: connections: Get ride of the xprt_done
callback.") we added an inconditional call to h2_wake_some_streams()
in h2_wake(), though we must not do it if the connection is destroyed
or we end up with a use-after-free. In this case it's already done in
h2_process() before destroying the connection anyway.
Let's just add this test for now. A cleaner approach might consist in
doing it in the h2_process() function itself when a connection status
change is detected.
No backport is needed, this is purely 2.2.
This commit is contained in:
parent
90de53dc79
commit
508f989758
1 changed files with 2 additions and 1 deletions
|
|
@ -3650,7 +3650,8 @@ static int h2_wake(struct connection *conn)
|
|||
|
||||
TRACE_ENTER(H2_EV_H2C_WAKE, conn);
|
||||
ret = h2_process(h2c);
|
||||
h2_wake_some_streams(h2c, 0);
|
||||
if (ret >= 0)
|
||||
h2_wake_some_streams(h2c, 0);
|
||||
TRACE_LEAVE(H2_EV_H2C_WAKE);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue