RETURN_OK_WITH_ERROR();
}
- argc = xlat_flatten_compiled_argv(cc->tmp_ctx, &argv, &head);
+ argc = xlat_flatten_compiled_argv(cc->tmp_ctx, &argv, head);
if (argc <= 0) {
fr_strerror_printf_push("ERROR in argument %d", (int) -argc);
RETURN_OK_WITH_ERROR();
int xlat_aeval_compiled_argv(TALLOC_CTX *ctx, char ***argv, request_t *request,
xlat_exp_head_t const *head, xlat_escape_legacy_t escape, void const *escape_ctx);
-int xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t **head);
+int xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t *head);
bool xlat_async_required(xlat_exp_head_t const *xlat);
*
* This is mostly for async use.
*/
-int xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t **head)
+int xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t *head)
{
int i;
xlat_exp_head_t **my_argv;
size_t count;
count = 0;
- xlat_exp_foreach(*head, node) {
+ xlat_exp_foreach(head, node) {
count++;
}
fr_assert(done_init);
i = 0;
- xlat_exp_foreach(*head, node) {
+ xlat_exp_foreach(head, node) {
fr_assert(node->type == XLAT_GROUP);
my_argv[i++] = talloc_steal(my_argv, node->group);
}
- talloc_free(*head);
- *head = NULL;
+ fr_dlist_talloc_free(&head->dlist);
return count;
}
{
xlat_logical_inst_t *inst = talloc_get_type_abort(xctx->inst, xlat_logical_inst_t);
- inst->argc = xlat_flatten_compiled_argv(inst, &inst->argv, &xctx->ex->call.args);
+ inst->argc = xlat_flatten_compiled_argv(inst, &inst->argv, xctx->ex->call.args);
inst->sense = (xctx->ex->call.func->token == T_LOR);
return 0;