diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-08-14 18:44:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 18:44:54 +0200 |
| commit | b57cb7a8e8a6134e2c67a091d4b8ade26abf3ddc (patch) | |
| tree | 8382b85e21915d837d93e47bda0bffdd43cd1635 | |
| parent | 9356e3fdb00c0e535c74e45bc8cb513156b01f51 (diff) | |
| parent | ce4e451c5b86d3f79c88283e2a7425ce32e9df1b (diff) | |
Merge pull request #16574 from donaldsharp/non_json_free_ptr
bgpd: Free up non-freed json memory on function return
| -rw-r--r-- | bgpd/bgp_vty.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |
