diff options
author | Tom Goff <thomas.goff@boeing.com> | 2010-11-10 13:03:02 -0800 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2012-01-02 19:50:50 +0400 |
commit | 65cd7a4a66145cf666df707781c3e46297158c58 (patch) | |
tree | ffb6551b3c022e64c1cae19e86eb49172f3bda0c /ospf6d/ospf6_intra.c | |
parent | 36d3e8d828e18c5c4cd097f659e3984ff02532cb (diff) | |
download | quagga-65cd7a4a66145cf666df707781c3e46297158c58.tar.bz2 quagga-65cd7a4a66145cf666df707781c3e46297158c58.tar.xz |
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.
Signed-off-by: Vyacheslav Trushkin <me@dogonthesun.net>
Diffstat (limited to 'ospf6d/ospf6_intra.c')
-rw-r--r-- | ospf6d/ospf6_intra.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 05b11ba3..9bc603b3 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1177,6 +1177,8 @@ ospf6_intra_prefix_lsa_remove (struct ospf6_lsa *lsa) } ospf6_route_remove (route, oa->route_table); } + if (route) + ospf6_route_unlock (route); } if (current != end && IS_OSPF6_DEBUG_EXAMIN (INTRA_PREFIX)) |