]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
mark the parent redundant xlat as taking "void"
authorAlan T. DeKok <aland@freeradius.org>
Thu, 8 Dec 2022 22:02:22 +0000 (17:02 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 8 Dec 2022 22:03:29 +0000 (17:03 -0500)
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.

src/lib/unlang/xlat_builtin.c

index 28ef3a6e0d1d399b3c15246d6fdea007ceec29fe..8e1e5968b8a417116969a5b858e32721a2775b0e 100644 (file)
@@ -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;
 }