summaryrefslogtreecommitdiff
path: root/lib/ns.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@openbsd.org>2018-02-26 21:29:57 -0300
committerGitHub <noreply@github.com>2018-02-26 21:29:57 -0300
commitcd3ac3b599e3b1ccb4085e691a047b896851aaa3 (patch)
tree771cc9a215f4e5c905602fbc2fd5e0c1e60f4341 /lib/ns.c
parente7c9f3f958cf087a0f29ef2b082cbe363e449f37 (diff)
parent27b136bd589ca2e6713ccaa6e0d8ea852c5f25a0 (diff)
Merge pull request #1750 from donaldsharp/zebra_other_tables
Zebra other tables
Diffstat (limited to 'lib/ns.c')
-rw-r--r--lib/ns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ns.c b/lib/ns.c
index fdf93d0742..0b2a3bec78 100644
--- a/lib/ns.c
+++ b/lib/ns.c
@@ -424,8 +424,11 @@ void ns_terminate(void)
{
struct ns *ns;
- while ((ns = RB_ROOT(ns_head, &ns_tree)) != NULL)
+ while (!RB_EMPTY(ns_head, &ns_tree)) {
+ ns = RB_ROOT(ns_head, &ns_tree);
+
ns_delete(ns);
+ }
}
/* Create a socket for the NS. */