summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2014-04-28 08:04:58 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2014-05-14 16:46:31 +0200
commite387dfd18ded3ddfef4c0a9cb896f73831864579 (patch)
tree9632ef5671fdbc44f43333427154002484c768e2 /ospfd
parent49d7af115177d05bd66d3115cbacd56a7591ec5e (diff)
downloadquagga-e387dfd18ded3ddfef4c0a9cb896f73831864579.tar.bz2
quagga-e387dfd18ded3ddfef4c0a9cb896f73831864579.tar.xz
ospfd: fix a reference counting issue introduced by commit 4de8bf0011
Commit 4de8bf0011 added a return statement to a loop iterating over a route_table. That loop uses route_top/route_next. As commit 4de8bf0011 failed to add a route_node_unlock before the return statement, a reference is leaked when this codepath is taken. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_lsa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 109a120b..270c1ea2 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2856,6 +2856,7 @@ ospf_maxage_lsa_remover (struct thread *thread)
if (thread_should_yield (thread))
{
OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0);
+ route_unlock_node(rn); /* route_top/route_next */
return 0;
}