diff --git a/include/proto/task.h b/include/proto/task.h index c876e7320..1f4b52e97 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -380,10 +380,10 @@ static inline void task_free(struct task *t) static inline void tasklet_free(struct tasklet *tl) { if (!LIST_ISEMPTY(&tl->list)) { + LIST_DEL(&tl->list); task_per_thread[tid].task_list_size--; _HA_ATOMIC_SUB(&tasks_run_queue, 1); } - LIST_DEL(&tl->list); pool_free(pool_head_tasklet, tl); if (unlikely(stopping))