summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-04 01:44:21 +0200
committerPaul Jakma <paul@quagga.net>2009-06-18 21:18:26 +0200
commit965f54f5ef0bd601cf129bd4b964863251313ec9 (patch)
tree106d6dbc1cf30d5a28066cbb268bf65cdcdc53bf /ospfd/ospfd.c
parent[zebra] Only announce connected routes if link is detected (diff)
downloadfrr-965f54f5ef0bd601cf129bd4b964863251313ec9.tar.xz
frr-965f54f5ef0bd601cf129bd4b964863251313ec9.zip
[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/ospfd.c')
-rw-r--r--ospfd/ospfd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index f2784887f..a9714f58d 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))