bgpd: unlock node on aggregate error
* bgp_route.c: (bgp_aggregate_set) make sure to unlock BGP node if failure
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 85526f5..8b0a3bf 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5059,11 +5059,12 @@
if (rn->info)
{
vty_out (vty, "There is already same aggregate network.%s", VTY_NEWLINE);
- /* remove old entry */
+ /* try to remove the old entry */
ret = bgp_aggregate_unset (vty, prefix_str, afi, safi);
if (ret)
{
- vty_out (vty, "Error deleteing aggregate%s", VTY_NEWLINE);
+ vty_out (vty, "Error deleting aggregate.%s", VTY_NEWLINE);
+ bgp_unlock_node (rn);
return CMD_WARNING;
}
}