]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Exited child should still definitely be in the parent state
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 6 Apr 2021 00:26:21 +0000 (01:26 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 6 Apr 2021 00:26:21 +0000 (01:26 +0100)
src/lib/unlang/parallel.c

index e7793775f1965c68ca23af589056d694dc9d68c8..8e06c2ed7a0c11f7495d96965114652dc487f72e 100644 (file)
@@ -42,9 +42,13 @@ static inline CC_HINT(always_inline) void unlang_parallel_cancel_child(unlang_pa
 
        switch (state->children[i].state) {
        case CHILD_INIT:
-       case CHILD_EXITED:
+               state->children[i].state = CHILD_CANCELLED;
                fr_assert(!state->children[i].request);
+               break;
+
+       case CHILD_EXITED:
                state->children[i].state = CHILD_CANCELLED;
+               TALLOC_FREE(state->children[i].request);
                break;
 
        case CHILD_RUNNABLE:    /* Don't check runnable_id, may be yielded */