BUG/MEDIUM: mux-h2: erase h2c->wait_event.tasklet on error path

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.
This commit is contained in:
Willy Tarreau 2023-03-20 19:16:04 +01:00
parent bcdc6cc15b
commit 389ab0d4b4

View 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();