diff options
author | Luke Howard <lukeh@padl.com> | 2011-11-14 16:59:55 +1100 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-11-14 16:59:55 +1100 |
commit | ac17a556bd50969c8157d50761449b702afa4af8 (patch) | |
tree | 61900a1a4746f20c2debae948322ea07330a2d44 /lib/radius/valuepair.c | |
parent | d6e790ddd52c0aa09af6e515d79d3a676c01fdad (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.c | 10 |
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; } |