diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 817e2e6c68..e94a31b685 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -12814,11 +12814,8 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty, json = NULL; } - if (use_json) { + if (use_json) vty_out(vty, "}\n"); - if (json) - json_object_free(json); - } else if (!nbr_output) vty_out(vty, "%% BGP instance not found\n"); }