From: Arran Cudbard-Bell Date: Sat, 25 Nov 2023 01:33:06 +0000 (-0600) Subject: Always initialise count and multi_index X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2f6fd873402d035353e24c108f1eee06ad597f3;p=thirdparty%2Ffreeradius-server.git Always initialise count and multi_index --- diff --git a/src/lib/unlang/call_env.c b/src/lib/unlang/call_env.c index 08b58470b18..73e9b74bb57 100644 --- a/src/lib/unlang/call_env.c +++ b/src/lib/unlang/call_env.c @@ -339,7 +339,7 @@ int call_env_parsed_valid(call_env_parsed_t const *parsed, CONF_ITEM const *ci, static int call_env_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *parsed, char const *name, fr_dict_t const *namespace, CONF_SECTION const *cs, call_env_parser_t const *rule) { CONF_PAIR const *cp, *next; - call_env_parsed_t *call_env_parsed; + call_env_parsed_t *call_env_parsed = NULL; ssize_t count, multi_index; fr_type_t type; @@ -363,6 +363,9 @@ static int call_env_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *parsed, char */ call_env_parsed_t *last = call_env_parsed_tail(parsed); + count = 0; + multi_index = 0; + if (rule->section.func(ctx, parsed, namespace, cf_section_to_item(subcs), rule) < 0) { cf_log_perr(cs, "Failed parsing configuration section %s", rule->name); talloc_free(call_env_parsed);