mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
BUG/MINOR: stick-tables: abort startup on stk_ctr pool creation failure
Since 3.3 with commit 945aa0ea82 ("MINOR: initcalls: Add a new initcall
stage, STG_INIT_2"), stkt_late_init() calls stkt_create_stk_ctr_pool()
but doesn't check its return value, so if the pool creation fails, the
process still starts, which is not correct. This patch adds a check for
the return value to make sure we fail to start in this case. This was
not an issue before 3.3 because the function was called as a post-check
handler which did check for errors in the returned values.
This commit is contained in:
parent
4e7c07736a
commit
e9e4821db5
1 changed files with 3 additions and 1 deletions
|
|
@ -5968,7 +5968,9 @@ static void stkt_late_init(void)
|
|||
f = find_sample_fetch("src", strlen("src"));
|
||||
if (f)
|
||||
smp_fetch_src = f->process;
|
||||
stkt_create_stk_ctr_pool();
|
||||
|
||||
if (stkt_create_stk_ctr_pool() & (ERR_ABORT | ERR_FATAL))
|
||||
exit(1); // error already reported by the function
|
||||
|
||||
for (i = 0; i < CONFIG_HAP_TBL_BUCKETS; i++) {
|
||||
MT_LIST_INIT(&per_bucket[i].toadd_tables);
|
||||
|
|
|
|||
Loading…
Reference in a new issue