From: Alan T. DeKok Date: Tue, 27 Jun 2017 14:03:09 +0000 (-0400) Subject: go to next at the end of the loop, not the start X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3535fa2b59471ce75f7f85717e65359f5d0d77ef;p=thirdparty%2Ffreeradius-server.git go to next at the end of the loop, not the start because foreach / load-balance set their own "next" manually --- diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index 165dbd3fd63..4d17a308486 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -1277,7 +1277,6 @@ start_subsection: */ while (frame->instruction != NULL) { resume_subsection: - frame->next = frame->instruction->next; instruction = frame->instruction; DUMP_STACK; @@ -1448,6 +1447,7 @@ resume_subsection: } /* switch over return code from the interpreter function */ frame->instruction = frame->next; + if (frame->instruction) frame->next = frame->instruction->next; } RDEBUG4("** [%i] %s - done current subsection with (%s %d)",