]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: fix a reference counting issue introduced by commit 4de8bf0011
authorChristian Franke <chris@opensourcerouting.org>
Mon, 28 Apr 2014 08:04:58 +0000 (08:04 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 14 May 2014 14:46:31 +0000 (16:46 +0200)
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>
ospfd/ospf_lsa.c

index 109a120b1f87c8d49e7abe9e4b75de50d58554ba..270c1ea216b6ddb389e493f647d0f48ddfe71d2e 100644 (file)
@@ -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;
           }