From: Miroslav Zagorac Date: Wed, 18 Jan 2023 18:33:21 +0000 (+0100) Subject: BUG/MINOR: ot: fixed wrong NULL check in flt_ot_parse_cfg_group() X-Git-Tag: v3.4-dev9~72 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=124e32ad7852b407bc583268d6149a3246b8f99b;p=thirdparty%2Fhaproxy.git BUG/MINOR: ot: fixed wrong NULL check in flt_ot_parse_cfg_group() After calling flt_ot_conf_group_init() and storing the result in flt_ot_current_group, the code incorrectly checked flt_ot_current_config for NULL instead of the newly assigned flt_ot_current_group. This meant a failed group init was never detected and the error path was never taken. --- diff --git a/addons/ot/src/parser.c b/addons/ot/src/parser.c index e067501cd..c59a18418 100644 --- a/addons/ot/src/parser.c +++ b/addons/ot/src/parser.c @@ -640,7 +640,7 @@ static int flt_ot_parse_cfg_group(const char *file, int linenum, char **args, in if (pdata->keyword == FLT_OT_PARSE_GROUP_ID) { flt_ot_current_group = flt_ot_conf_group_init(args[1], linenum, &(flt_ot_current_config->groups), &err); - if (flt_ot_current_config == NULL) + if (flt_ot_current_group == NULL) retval |= ERR_ABORT | ERR_ALERT; } else if (pdata->keyword == FLT_OT_PARSE_GROUP_SCOPES) {