[prev in list] [next in list] [prev in thread] [next in thread]
List: quagga-dev
Subject: [quagga-dev 6641] [PATCH] OSPF: fix route node reference count leak
From: Stephen Hemminger <shemminger () vyatta ! com>
Date: 2009-06-04 17:49:21
Message-ID: 20090604104921.2f445369 () nehalam
[Download RAW message or body]
The route node for ospf network was never being cleared, so ospf
networks never disappear when deleted.
In ospf_network_unset, it call route_node_lookup(); the returned route
will normally have a lock count of 2: first reference is the initial
reference from creation (route_node_get in ospf_network_set), and the
second reference is the count added by route_node_lookup.
---
ospfd/ospfd.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--- a/ospfd/ospfd.c 2009-03-11 08:57:09.478314553 -0700
+++ b/ospfd/ospfd.c 2009-06-04 10:41:00.465574420 -0700
@@ -782,12 +782,13 @@ ospf_network_unset (struct ospf *ospf, s
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))
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic