diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f09074c7cd..c9c7b80496 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -12049,6 +12049,8 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, if (show_failed && !failed_count) { if (use_json) { + json_object_free(json_peers); + json_object_int_add(json, "failedPeersCount", 0); json_object_int_add(json, "dynamicPeers", dn_count); json_object_int_add(json, "totalPeers", count);