]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: ospf_nbr_nbma_set()/ospf_snmp_vl_add() add unlock
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Mon, 8 Mar 2010 12:58:14 +0000 (13:58 +0100)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:33:31 +0000 (15:33 +0000)
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 4de398e3b676bcf041984e285dba12f229215419)

ospfd/ospf_snmp.c
ospfd/ospfd.c

index 9f91776944d7f2ccb7e86aeb097e47452d596316..604766d8255f1d2941aeab6c5abc8a4051a942c2 100644 (file)
@@ -1927,6 +1927,9 @@ ospf_snmp_vl_add (struct ospf_vl_data *vl_data)
   lp.adv_router = vl_data->vl_peer;
 
   rn = route_node_get (ospf_snmp_vl_table, (struct prefix *) &lp);
+  if (rn->info)
+    route_unlock_node (rn);
+
   rn->info = vl_data;
 }
 
index b4da7336104d333ef6b577cf309a919698b07707..7af6ddc379d4f8894ea4e81c80d6d48d7618a6c4 100644 (file)
@@ -1830,6 +1830,8 @@ ospf_nbr_nbma_set (struct ospf *ospf, struct in_addr nbr_addr)
   p.prefixlen = IPV4_MAX_BITLEN;
 
   rn = route_node_get (ospf->nbr_nbma, (struct prefix *)&p);
+  if (rn->info)
+    route_unlock_node (rn);
   rn->info = nbr_nbma;
 
   for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))