summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_nexthop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index d4692366..4076fe41 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -604,6 +604,10 @@ bgp_address_del (struct prefix *p)
tmp.addr = p->u.prefix4;
addr = hash_lookup (bgp_address_hash, &tmp);
+ /* may have been deleted earlier by bgp_interface_down() */
+ if (addr == NULL)
+ return;
+
addr->refcnt--;
if (addr->refcnt == 0)