[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.
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index f278488..a9714f5 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -782,12 +782,13 @@
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))