]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Pass empty result when calling xlat_frame_eval_repeat internally
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Jan 2018 01:51:05 +0000 (18:51 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Jan 2018 01:51:05 +0000 (18:51 -0700)
src/main/xlat_eval.c

index 5e0102511dce188ffcae9bc91e408e1f08ca6e5e..fae8952b73046be9fcf89b3618c6c60640942f3a 100644 (file)
@@ -800,6 +800,9 @@ xlat_action_t xlat_frame_eval(TALLOC_CTX *ctx, fr_cursor_t *out, xlat_exp_t cons
                        continue;
 
                case XLAT_FUNC:
+               {
+                       fr_value_box_t empty;
+
                        XLAT_DEBUG("** [%i] %s(func) - %%{%s: }", unlang_stack_depth(request), __FUNCTION__,
                                   node->fmt);
 
@@ -812,12 +815,16 @@ xlat_action_t xlat_frame_eval(TALLOC_CTX *ctx, fr_cursor_t *out, xlat_exp_t cons
                                xa = XLAT_ACTION_PUSH_CHILD;
                                goto finish;
                        }
+
+                       memset(&empty, 0, sizeof(empty));
+
                        /*
                         *      If there's no children we can just
                         *      call the function directly.
                         */
                        if (xlat_frame_eval_repeat(ctx, out, child, NULL,
-                                                  request, in, NULL) == XLAT_ACTION_FAIL) goto fail;
+                                                  request, in, &empty) == XLAT_ACTION_FAIL) goto fail;
+               }
                        continue;
 
 #ifdef HAVE_REGEX