]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: erase h2c->wait_event.tasklet on error path
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Mar 2023 18:16:04 +0000 (19:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Mar 2023 18:58:38 +0000 (19:58 +0100)
On the allocation error path in h2_init() we may check if
h2c->wait_event.tasklet needs to be released but it has not yet been
zeroed. Let's do this before jumping to the freeing location.

This needs to be backported to all maintained versions.

src/mux_h2.c

index 1d4dd3a756e3c07efb7f5d0b7451dbc4268509f0..869779968ecdadcc78ac5f297638eafb63558f52 100644 (file)
@@ -962,6 +962,7 @@ static int h2_init(struct connection *conn, struct proxy *prx, struct session *s
 
        h2c->proxy = prx;
        h2c->task = NULL;
+       h2c->wait_event.tasklet = NULL;
        h2c->idle_start = now_ms;
        if (tick_isset(h2c->timeout)) {
                t = task_new_here();