BUG/MAJOR: mux-h2: don't wake streams after connection was destroyed
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2020 03:38:56 +0000 (04:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2020 03:42:05 +0000 (04:42 +0100)
commit508f98975838e8716e6531af8771c4e1ca46d693
treeb1bb7b2b3bced6c76f6261bab97e2068e08560fe
parent90de53dc79a316a79567972cede3673c10fba13d
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.
src/mux_h2.c