]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: Check buffer pool creation for failures
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 30 Jan 2026 10:10:12 +0000 (11:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Feb 2026 12:26:20 +0000 (13:26 +0100)
The call to init_buffer() during the worker startup may fail. In that case,
an error message is displayed but the error was not properly handled. So
let's add the proper check and exit on error.

src/haproxy.c

index bdad75503033a9ca8b4957fbcb71b6e8a5511830..4edd66da149eb2ee411dc0ce8a124e7564d356d7 100644 (file)
@@ -2347,7 +2347,8 @@ static void step_init_2(int argc, char** argv)
                deinit_and_exit(0);
 
        /* now we know the buffer size, we can initialize the channels and buffers */
-       init_buffer();
+       if (!init_buffer())
+               exit(1); // error already reported
 
        list_for_each_entry(pcf, &post_check_list, list) {
                err_code |= pcf->fct();