From 965f54f5ef0bd601cf129bd4b964863251313ec9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 3 Jun 2009 16:44:21 -0700 Subject: [ospfd] Fix OSPF route refcount leak This may fix vyatta BUG 3096. The reference count for OSPF route table was never completely freed on deleting all neighbors. --- ospfd/ospfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ospfd') diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index f2784887..a9714f58 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -782,12 +782,13 @@ ospf_network_unset (struct ospf *ospf, struct prefix_ipv4 *p, return 0; network = rn->info; + route_unlock_node (rn); if (!IPV4_ADDR_SAME (&area_id, &network->area_id)) return 0; ospf_network_free (ospf, rn->info); rn->info = NULL; - route_unlock_node (rn); + route_unlock_node (rn); /* initial reference */ /* Find interfaces that not configured already. */ for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi)) -- cgit v1.2.3