diff options
author | Russ White <russ@riw.us> | 2021-02-02 13:30:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 13:30:06 +0100 |
commit | a67b8731d27a7ebc8fd55122a8a919a07d39346d (patch) | |
tree | a39a5c572f69de39cf5d74c0b4dc3f27e90bfad6 /ospf6d | |
parent | Merge pull request #7985 from donaldsharp/eigrp_uninited (diff) | |
parent | zebra: Prevent sending of unininted data (diff) | |
download | frr-a67b8731d27a7ebc8fd55122a8a919a07d39346d.tar.xz frr-a67b8731d27a7ebc8fd55122a8a919a07d39346d.zip |
Merge pull request #7991 from donaldsharp/valgrind_cleanups1
Valgrind cleanups
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_asbr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index fdfd53276..3449f4826 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -210,7 +210,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, struct ospf6_route *route, struct ospf6 *ospf6) { - struct ospf6_route *old_route; + struct ospf6_route *old_route, *next_route; struct ospf6_path *ecmp_path, *o_path = NULL; struct listnode *anode, *anext; struct listnode *nnode, *rnode, *rnext; @@ -220,9 +220,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, /* check for old entry match with new route origin, * delete old entry. */ - for (old_route = old; old_route; old_route = old_route->next) { + for (old_route = old; old_route; old_route = next_route) { bool route_updated = false; + next_route = old_route->next; + if (!ospf6_route_is_same(old_route, route) || (old_route->path.type != route->path.type)) continue; @@ -315,6 +317,8 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, old_route->path.cost, route->path.cost); } + if (old == old_route) + old = next_route; ospf6_route_remove(old_route, ospf6->route_table); } |