From: Arran Cudbard-Bell Date: Wed, 7 May 2025 00:51:47 +0000 (-0600) Subject: Sanity checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ea74840dfca90ed0396d4e82c2c7d66497bc4e1;p=thirdparty%2Ffreeradius-server.git Sanity checks --- diff --git a/src/lib/unlang/subrequest_child.c b/src/lib/unlang/subrequest_child.c index 8efb21cb496..1849c2a4207 100644 --- a/src/lib/unlang/subrequest_child.c +++ b/src/lib/unlang/subrequest_child.c @@ -260,6 +260,8 @@ static unlang_action_t unlang_subrequest_calculate_result(rlm_rcode_t *p_result, * i.e. after calling unlang_subrequest_child_push, the code in the parent * can call UNLANG_ACTION_PUSHED_CHILD, which will result in _this_ frame * being executed, and _this_ frame can yield. + * + * @note Called from the parent to start a child running. */ unlang_action_t unlang_subrequest_child_run(UNUSED rlm_rcode_t *p_result, UNUSED request_t *request, unlang_stack_frame_t *frame) @@ -331,6 +333,8 @@ int unlang_subrequest_child_push(rlm_rcode_t *out, request_t *child, unlang_frame_state_subrequest_t *state; unlang_stack_frame_t *frame; + fr_assert_msg(child->parent, "Child's request pointer must not be NULL when calling subrequest_child_push"); + /* * Push a new subrequest frame onto the stack *