From: Donald Sharp Date: Mon, 11 Feb 2019 12:19:14 +0000 (-0500) Subject: eigrpd: Correctly handle the ref-count in a couple of spots X-Git-Tag: 7.1_pulled~254^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=051da24eef4f877140f9905b0416e424589484e8;p=mirror%2Ffrr.git eigrpd: Correctly handle the ref-count in a couple of spots The ref count for the eigrp topology table was incorrect in a couple of spots. Let's clean it up. Signed-off-by: Donald Sharp --- diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index 23f5a705eb..e861cdb333 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -141,10 +141,10 @@ void eigrp_prefix_entry_add(struct route_table *topology, __PRETTY_FUNCTION__, prefix2str(pe->destination, buf, sizeof(buf))); } + route_unlock_node(rn); } rn->info = pe; - route_lock_node(rn); } /* diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index 104f35244e..a9b103de47 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -559,6 +559,7 @@ DEFPY (show_ip_eigrp_topology, tn = rn->info; eigrp_vty_display_prefix_entry(vty, eigrp, tn, argc == 5); + route_unlock_node(rn); return CMD_SUCCESS; }