ospfd: ospf_nbr_nbma_set()/ospf_snmp_vl_add() add unlock

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 4de398e3b676bcf041984e285dba12f229215419)
This commit is contained in:
Joakim Tjernlund 2010-03-08 13:58:14 +01:00 committed by Daniel Walton
parent 326a0eb09c
commit 14fcc0e631
2 changed files with 5 additions and 0 deletions

View File

@ -1927,6 +1927,9 @@ ospf_snmp_vl_add (struct ospf_vl_data *vl_data)
lp.adv_router = vl_data->vl_peer; lp.adv_router = vl_data->vl_peer;
rn = route_node_get (ospf_snmp_vl_table, (struct prefix *) &lp); rn = route_node_get (ospf_snmp_vl_table, (struct prefix *) &lp);
if (rn->info)
route_unlock_node (rn);
rn->info = vl_data; rn->info = vl_data;
} }

View File

@ -1830,6 +1830,8 @@ ospf_nbr_nbma_set (struct ospf *ospf, struct in_addr nbr_addr)
p.prefixlen = IPV4_MAX_BITLEN; p.prefixlen = IPV4_MAX_BITLEN;
rn = route_node_get (ospf->nbr_nbma, (struct prefix *)&p); rn = route_node_get (ospf->nbr_nbma, (struct prefix *)&p);
if (rn->info)
route_unlock_node (rn);
rn->info = nbr_nbma; rn->info = nbr_nbma;
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi)) for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))