Navigation Menu

Skip to content

Commit

Permalink
Fix corner case when using fr_cursor_remove and fr_cursor_next_by_da …
Browse files Browse the repository at this point in the history
…together
  • Loading branch information
arr2036 committed May 23, 2014
1 parent 7fe3ec0 commit 61002b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/cursor.c
Expand Up @@ -265,6 +265,9 @@ VALUE_PAIR *fr_cursor_remove(vp_cursor_t *cursor)
*last = vp->next;
vp->next = NULL;

/* Fixup cursor->found if we removed the VP it was referring to */
if (vp == cursor->found) cursor->found = *last;

return vp;
}

Expand Down

0 comments on commit 61002b7

Please sign in to comment.