From: Alan T. DeKok Date: Thu, 26 Sep 2019 16:16:06 +0000 (-0400) Subject: try to quiet analyzer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e259345a57f5225330cda5f38c4905d6b18ec9c6;p=thirdparty%2Ffreeradius-server.git try to quiet analyzer --- diff --git a/src/lib/unlang/load_balance.c b/src/lib/unlang/load_balance.c index 58957595a8e..e9d5f6bab4a 100644 --- a/src/lib/unlang/load_balance.c +++ b/src/lib/unlang/load_balance.c @@ -39,6 +39,12 @@ static unlang_action_t unlang_load_balance_next(REQUEST *request, rlm_rcode_t *p redundant = talloc_get_type_abort(frame->state, unlang_frame_state_redundant_t); +#ifdef __clang_analyzer__ + if (!redundant->found) { + *presult = RLM_MODULE_FAIL: + return UNLANG_ACTION_CALCULATE_RESULT; + } +#endif /* * Set up the first round versus subsequent ones. */ @@ -90,7 +96,6 @@ static unlang_action_t unlang_load_balance_next(REQUEST *request, rlm_rcode_t *p * modules in the unlang_frame_state_redundant_t * structure. */ - rad_assert(redundant->child != NULL); redundant->child = redundant->child->next; if (!redundant->child) redundant->child = g->children;