Skip to content

Commit

Permalink
delete all matchine local variables
Browse files Browse the repository at this point in the history
they can be created in any order, so we can't rely on just checking
the tail
  • Loading branch information
alandekok committed Sep 25, 2023
1 parent 35cf886 commit 04fdc05
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/unlang/interpret.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ typedef struct {

static int _local_variables_free(unlang_variable_ref_t *ref)
{
fr_pair_t *vp;

while ((vp = fr_pair_list_tail(&ref->request->local_pairs)) != NULL) {
fr_pair_list_foreach(&ref->request->local_pairs, vp) {
if (vp->da->dict != ref->dict) break;

(void) fr_pair_delete(&ref->request->local_pairs, vp);
Expand Down

0 comments on commit 04fdc05

Please sign in to comment.