projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fe3ec0
)
Fix corner case when using fr_cursor_remove and fr_cursor_next_by_da together
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 23 May 2014 13:49:49 +0000
(14:49 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 23 May 2014 14:03:23 +0000
(15:03 +0100)
src/lib/cursor.c
patch
|
blob
|
history
diff --git
a/src/lib/cursor.c
b/src/lib/cursor.c
index
6602047
..
39b9f9e
100644
(file)
--- a/
src/lib/cursor.c
+++ b/
src/lib/cursor.c
@@
-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;
}