]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: Correctly handle the ref-count in a couple of spots
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Feb 2019 12:19:14 +0000 (07:19 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Feb 2019 12:19:14 +0000 (07:19 -0500)
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 <sharpd@cumulusnetworks.com>
eigrpd/eigrp_topology.c
eigrpd/eigrp_vty.c

index 23f5a705eb40cfc02af4230a491aca5b0d55b0a0..e861cdb333b0538d49b707afad1e0eb20fe0bb2b 100644 (file)
@@ -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);
 }
 
 /*
index 104f35244ea84b0589b669dd300abe32ddf7608c..a9b103de471629eaac79f248942db51089cc62e8 100644 (file)
@@ -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;
 }