diff --git a/include/proto/task.h b/include/proto/task.h index eef4ded43..5445c9906 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -347,6 +347,8 @@ static inline void task_free(struct task *t) static inline void tasklet_free(struct tasklet *tl) { + if (!LIST_ISEMPTY(&tl->list)) + task_list_size[tid]--; LIST_DEL(&tl->list); pool_free(pool_head_tasklet, tl);