summaryrefslogtreecommitdiff
path: root/lib/radius/valuepair.c
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2011-11-14 16:59:55 +1100
committerLuke Howard <lukeh@padl.com>2011-11-14 16:59:55 +1100
commitac17a556bd50969c8157d50761449b702afa4af8 (patch)
tree61900a1a4746f20c2debae948322ea07330a2d44 /lib/radius/valuepair.c
parentd6e790ddd52c0aa09af6e515d79d3a676c01fdad (diff)
port new RADIUS library to Windows
Conflicts: lib/configure.ac lib/include/radsec/radsec.h lib/radius/client.h
Diffstat (limited to 'lib/radius/valuepair.c')
-rw-r--r--lib/radius/valuepair.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/radius/valuepair.c b/lib/radius/valuepair.c
index b374fdd..6277f7d 100644
--- a/lib/radius/valuepair.c
+++ b/lib/radius/valuepair.c
@@ -35,17 +35,13 @@ void nr_vp_free(VALUE_PAIR **head)
{
VALUE_PAIR *next, *vp;
- if (!head || !*head) return;
-
- vp = *head;
- do {
- if (vp) next = vp->next;
+ for (vp = *head; vp != NULL; vp = next) {
+ next = vp->next;
if (vp->da->flags.encrypt) {
memset(vp, 0, sizeof(vp));
}
free(vp);
- vp = next;
- } while (next);
+ }
*head = NULL;
}