diff options
| -rw-r--r-- | bgpd/bgp_community_alias.c | 7 | ||||
| -rw-r--r-- | ospfd/ospf_spf.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/bgpd/bgp_community_alias.c b/bgpd/bgp_community_alias.c index 431e6e00a4..3750a24680 100644 --- a/bgpd/bgp_community_alias.c +++ b/bgpd/bgp_community_alias.c @@ -81,9 +81,16 @@ void bgp_community_alias_init(void) "BGP community alias (alias)"); } +static void bgp_ca_free(void *ca) +{ + XFREE(MTYPE_COMMUNITY_ALIAS, ca); +} + void bgp_community_alias_finish(void) { + hash_clean(bgp_ca_community_hash, bgp_ca_free); hash_free(bgp_ca_community_hash); + hash_clean(bgp_ca_alias_hash, bgp_ca_free); hash_free(bgp_ca_alias_hash); } diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 44549b980c..74a5674273 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1464,8 +1464,13 @@ static void ospf_spf_next(struct vertex *v, struct ospf_area *area, if (ospf_nexthop_calculation(area, v, w, l, distance, lsa_pos)) vertex_pqueue_add(candidate, w); - else if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Nexthop Calc failed"); + else { + listnode_delete(area->spf_vertex_list, w); + ospf_vertex_free(w); + w_lsa->stat = LSA_SPF_NOT_EXPLORED; + if (IS_DEBUG_OSPF_EVENT) + zlog_debug("Nexthop Calc failed"); + } } else if (w_lsa->stat != LSA_SPF_IN_SPFTREE) { w = w_lsa->stat; if (w->distance < distance) { |
