From: Alan T. DeKok Date: Thu, 8 Dec 2022 22:02:22 +0000 (-0500) Subject: mark the parent redundant xlat as taking "void" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b3448f23a4cfa229610c4a08ca141980df5254b;p=thirdparty%2Ffreeradius-server.git mark the parent redundant xlat as taking "void" so that we can free it's args, and they don't be expanded. The arguments will still be used for the parser, so it's not all lost. --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 28ef3a6e0d1..8e1e5968b8a 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -801,11 +801,16 @@ static int xlat_redundant_instantiate(xlat_inst_ctx_t const *xctx) * a copy of the original arguments with each * function that's called. */ -// fr_dlist_talloc_free(&xctx->ex->call.args->dlist); + fr_dlist_talloc_free(&xctx->ex->call.args->dlist); return 0; } +static xlat_arg_parser_t const xlat_redundant_args[] = { + { .type = FR_TYPE_VOID }, + XLAT_ARG_PARSER_TERMINATOR +}; + /** Registers a redundant xlat * * These xlats wrap the xlat methods of the modules in a redundant section, @@ -947,7 +952,7 @@ int xlat_register_redundant(CONF_SECTION *cs) return -1; } xlat_async_instantiate_set(xlat, xlat_redundant_instantiate, xlat_redundant_inst_t, NULL, xr); - if (args) xlat_func_args(xlat, args); + if (args) xlat_func_args(xlat, xlat_redundant_args); return 0; }