summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-03 16:44:21 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-04 10:09:05 -0700
commit48f18673ae7f44cd6331bb8e2878f2c213ff73e4 (patch)
tree99c8148eec07afcb61a81dc3b6c4b65be52cf4ef
parent985852c5d1330646d37b4c91669f05a146e7f140 (diff)
downloadquagga-48f18673ae7f44cd6331bb8e2878f2c213ff73e4.tar.bz2
quagga-48f18673ae7f44cd6331bb8e2878f2c213ff73e4.tar.xz
Fix OSPF route refcount leak
This may fix BUG 3096. The reference count for OSPF route table was never completely freed on deleting all neighbors.
-rw-r--r--ospfd/ospfd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 7c2698dc..965d31f9 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))