]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
go to next at the end of the loop, not the start
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jun 2017 14:03:09 +0000 (10:03 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jun 2017 14:04:53 +0000 (10:04 -0400)
because foreach / load-balance set their own "next" manually

src/main/unlang_interpret.c

index 165dbd3fd631b2f7bb92a913d3a258f5f74a8822..4d17a308486e2ba0c57629dea8073d1638291f97 100644 (file)
@@ -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)",