mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-26 04:48:03 +00:00
BUILD: stick-table: make sure not to fail on task_new() during initialization
Gcc reports a potential null-deref error in the stick-table init code. While not critical there, it's trivial to fix. This check has been missing since 1.4 so this fix can be backported to all supported versions.
This commit is contained in:
parent
a8825520b7
commit
848522f05d
@ -603,6 +603,8 @@ int stktable_init(struct stktable *t)
|
||||
t->exp_next = TICK_ETERNITY;
|
||||
if ( t->expire ) {
|
||||
t->exp_task = task_new(MAX_THREADS_MASK);
|
||||
if (!t->exp_task)
|
||||
return 0;
|
||||
t->exp_task->process = process_table_expire;
|
||||
t->exp_task->context = (void *)t;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user