diff options
author | Tom Goff <thomas.goff@boeing.com> | 2010-11-10 22:03:02 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2011-03-21 14:31:16 +0100 |
commit | e7a6d80d4fe70a546a33ffe063f182252237ccd8 (patch) | |
tree | d0315314a3772846fef416f027ec42b445fb0ce9 /ospf6d/ospf6_route.c | |
parent | ospf6d: Have ospf6d cleanup when it terminates normally (diff) | |
download | frr-e7a6d80d4fe70a546a33ffe063f182252237ccd8.tar.xz frr-e7a6d80d4fe70a546a33ffe063f182252237ccd8.zip |
ospf6d: Route locking (memory) cleanup
* ospf6_route.c: (ospf6_route_best_next) Allows unlock route, even
when there's no next route. This is consistent with how
ospf6_route_next() behaves.
* ospf6_intra.c: (ospf6_intra_prefix_lsa_remove) Make sure the last
route considered is always unlocked. This is needed when the for
loop terminates because ospf6_route_is_prefix() returns zero.
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r-- | ospf6d/ospf6_route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 1e1f4fb5a..b13897d54 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -690,6 +690,8 @@ ospf6_route_best_next (struct ospf6_route *route) struct route_node *rnode; struct ospf6_route *next; + ospf6_route_unlock (route); + rnode = route->rnode; route_lock_node (rnode); rnode = route_next (rnode); @@ -701,7 +703,6 @@ ospf6_route_best_next (struct ospf6_route *route) assert (rnode->info); next = (struct ospf6_route *) rnode->info; - ospf6_route_unlock (route); ospf6_route_lock (next); return next; } |