From: Willy Tarreau Date: Mon, 26 Jan 2026 10:31:24 +0000 (+0100) Subject: BUG/MINOR: stick-tables: abort startup on stk_ctr pool creation failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9e4821db52b9e2e1c01921d889d0cca8b8759b5;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/stick_table.c b/src/stick_table.c index 6cc9e177c..5f60ef8e3 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -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);