summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-03 16:44:21 -0700
committerPaul Jakma <paul@quagga.net>2009-06-18 20:18:26 +0100
commit965f54f5ef0bd601cf129bd4b964863251313ec9 (patch)
tree106d6dbc1cf30d5a28066cbb268bf65cdcdc53bf /ospfd
parentfd21325b2eb252644bc70918ace4f9c6c00c45ef (diff)
[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.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospfd.c3
1 files changed, 2 insertions, 1 deletions
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))