Merge pull request #16574 from donaldsharp/non_json_free_ptr

bgpd: Free up non-freed json memory on function return
This commit is contained in:
Donatas Abraitis 2024-08-14 18:44:54 +02:00 committed by GitHub
commit b57cb7a8e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);