1 commit eb72c1faedc39c68fb1246ea8a97d1f96831756c
2 Author: Willy Tarreau <w@1wt.eu>
3 Date: Mon Oct 15 11:12:15 2018 +0200
5 BUILD: stick-table: make sure not to fail on task_new() during initialization
7 Gcc reports a potential null-deref error in the stick-table init code.
8 While not critical there, it's trivial to fix. This check has been
9 missing since 1.4 so this fix can be backported to all supported versions.
11 (cherry picked from commit 848522f05df9e60eea9274e11f1e9fcd19594a5c)
12 Signed-off-by: Willy Tarreau <w@1wt.eu>
14 diff --git a/src/stick_table.c b/src/stick_table.c
15 index 5a2f1295..653a1ffb 100644
16 --- a/src/stick_table.c
17 +++ b/src/stick_table.c
18 @@ -602,6 +602,8 @@ int stktable_init(struct stktable *t)
19 t->exp_next = TICK_ETERNITY;
21 t->exp_task = task_new(MAX_THREADS_MASK);
24 t->exp_task->process = process_table_expire;
25 t->exp_task->context = (void *)t;