{
unlang_frame_state_edit_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_edit_t);
- RINDENT_SAVE(&state->indent, request);
-
/*
* Keep running the "expand map" function until done.
*/
rcode = state->current->func(request, state, state->current);
if (rcode < 0) {
+ RINDENT_RESTORE(request, &state->indent);
+
fr_edit_list_abort(state->el);
TALLOC_FREE(frame->state);
repeatable_clear(frame);
* failures, which simply don't
* apply the operations.
*/
- RINDENT_RESTORE(request, &state->indent);
return UNLANG_ACTION_CALCULATE_RESULT;
}
current->check_lhs = check_lhs;
current->expanded_lhs = expanded_lhs_attribute;
+ /*
+ * Save current indentation for the error path.
+ */
+ RINDENT_SAVE(&state->indent, request);
+
/*
* Call process_edit to do all of the work.
*/