From: Christian Franke Date: Mon, 28 Apr 2014 08:04:58 +0000 (+0000) Subject: ospfd: fix a reference counting issue introduced by commit 4de8bf0011 X-Git-Tag: frr-2.0-rc1~1604 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e387dfd18ded3ddfef4c0a9cb896f73831864579;p=mirror%2Ffrr.git 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 Acked-by: Feng Lu Signed-off-by: David Lamparter --- diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 109a120b1f..270c1ea216 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; }