summaryrefslogtreecommitdiff
path: root/ldpd/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/interface.c')
-rw-r--r--ldpd/interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c
index bbcea9f553..b25be43a5c 100644
--- a/ldpd/interface.c
+++ b/ldpd/interface.c
@@ -306,8 +306,11 @@ if_reset(struct iface *iface, int af)
ia = iface_af_get(iface, af);
if_stop_hello_timer(ia);
- while ((adj = RB_ROOT(ia_adj_head, &ia->adj_tree)) != NULL)
+ while (!RB_EMPTY(ia_adj_head, &ia->adj_tree)) {
+ adj = RB_ROOT(ia_adj_head, &ia->adj_tree);
+
adj_del(adj, S_SHUTDOWN);
+ }
/* try to cleanup */
switch (af) {