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.
This commit is contained in:
Miroslav Zagorac 2023-01-18 19:33:21 +01:00 committed by William Lallemand
parent 9fa34e592a
commit 124e32ad78

View File

@ -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) {