]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Quiet CI
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 18 Mar 2021 00:23:25 +0000 (00:23 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 18 Mar 2021 00:37:16 +0000 (00:37 +0000)
src/lib/unlang/xlat_eval.c
src/lib/util/value.c

index 3ad3ecac15e9372686344f87204b19ec3853c575..00d1c1c5fd210b94115be07c675ae4a104e20770 100644 (file)
@@ -1052,17 +1052,22 @@ xlat_action_t xlat_frame_eval_repeat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                   (node->call.func->input_type == XLAT_INPUT_ARGS) ? ')' : '}');
 
                        VALUE_BOX_TALLOC_LIST_VERIFY(result);
+
+                       /*
+                        *      Always need to init and free the
+                        *      copy list as debug level could change
+                        *      when the xlat function executes.
+                        */
+                       fr_value_box_list_init(&result_copy);
+
                        /*
                         *      Need to copy the input list in case
                         *      the async function mucks with it.
                         */
-                       if (RDEBUG_ENABLED2) {
-                               fr_value_box_list_init(&result_copy);
-                               fr_value_box_list_acopy(NULL, &result_copy, result);
-                       }
+                       if (RDEBUG_ENABLED2) fr_value_box_list_acopy(NULL, &result_copy, result);
                        xa = xlat_process_args(ctx, result, request, node->call.func->input_type, node->call.func->args);
                        if (xa == XLAT_ACTION_FAIL) {
-                               if (RDEBUG_ENABLED2) fr_dlist_talloc_free(&result_copy);
+                               fr_dlist_talloc_free(&result_copy);
                                return xa;
                        }
                        VALUE_BOX_TALLOC_LIST_VERIFY(result);
@@ -1071,10 +1076,9 @@ xlat_action_t xlat_frame_eval_repeat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                                         node->call.inst->data, thread_inst->data, result);
                        VALUE_BOX_TALLOC_LIST_VERIFY(result);
 
-                       if (RDEBUG_ENABLED2) {
-                               xlat_debug_log_expansion(request, *in, &result_copy);
-                               fr_dlist_talloc_free(&result_copy);
-                       }
+                       if (RDEBUG_ENABLED2) xlat_debug_log_expansion(request, *in, &result_copy);
+                       fr_dlist_talloc_free(&result_copy);
+
                        switch (xa) {
                        case XLAT_ACTION_FAIL:
                                return xa;
index 20be92fdd22d937650e3946d3d2f7c3c6d020e26..8ad0d52942d9af9748385c3ff59602c97e468bbf 100644 (file)
@@ -5176,7 +5176,7 @@ void value_box_verify(char const *file, int line, fr_value_box_t const *vb, bool
 {
        fr_fatal_assert_msg(vb, "CONSISTENCY CHECK FAILED %s[%i]: fr_value_box_t pointer was NULL", file, line);
 
-       if (talloced) talloc_get_type_abort_const(vb, fr_value_box_t);
+       if (talloced) vb = talloc_get_type_abort_const(vb, fr_value_box_t);
 
        switch (vb->type) {
        case FR_TYPE_STRING: