From: William Lallemand Date: Wed, 4 May 2022 12:29:46 +0000 (+0200) Subject: MINOR: init: exit() after pre-check upon error X-Git-Tag: v2.6-dev9~104 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=8b9a2df969a38373328e0ad44ce8f0f8ea62c051;p=haproxy.git MINOR: init: exit() after pre-check upon error Add a test on the err_code variable so we don't go further if one of the pre-check callback failed. --- diff --git a/src/haproxy.c b/src/haproxy.c index 02690edb7..ec40a6427 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2117,6 +2117,11 @@ static void init(int argc, char **argv) list_for_each_entry(prcf, &pre_check_list, list) err_code |= prcf->fct(); + if (err_code & (ERR_ABORT|ERR_FATAL)) { + ha_alert("Fatal errors found in configuration.\n"); + exit(1); + } + err_code |= check_config_validity(); for (px = proxies_list; px; px = px->next) { struct server *srv;