projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c5715c
)
Adding the same VP twice is bad mm'k Fixes #809
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Thu, 9 Oct 2014 14:32:01 +0000
(10:32 -0400)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Thu, 9 Oct 2014 14:32:08 +0000
(10:32 -0400)
src/lib/valuepair.c
patch
|
blob
|
history
diff --git
a/src/lib/valuepair.c
b/src/lib/valuepair.c
index
2321fe5
..
d81d4ea
100644
(file)
--- a/
src/lib/valuepair.c
+++ b/
src/lib/valuepair.c
@@
-283,11
+283,17
@@
void pairadd(VALUE_PAIR **first, VALUE_PAIR *add)
*first = add;
return;
}
- for(i = *first; i->next; i = i->next) {
+#ifdef WITH_VERIFY_PTR
+ for (i = *first; i->next; i = i->next) {
VERIFY_VP(i);
- if(i == add)
- return;
+ /*
+ * The same VP should never by added multiple times
+ * to the same list.
+ */
+ fr_assert(i != add);
}
+#endif
+
i->next = add;
}