mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 20:18:54 +00:00
Merge pull request #2890 from patrasar/Fix_2847
bgpd: Fix memory leak show ip bgp json
This commit is contained in:
commit
ff7f6cd829
@ -8202,7 +8202,6 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
|
|||||||
vty_out(vty, " \"routeDistinguishers\" : {");
|
vty_out(vty, " \"routeDistinguishers\" : {");
|
||||||
++*json_header_depth;
|
++*json_header_depth;
|
||||||
}
|
}
|
||||||
json_paths = json_object_new_object();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_json && rd) {
|
if (use_json && rd) {
|
||||||
@ -8429,8 +8428,6 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
|
|||||||
*total_cum = total_count;
|
*total_cum = total_count;
|
||||||
}
|
}
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
if (json_paths)
|
|
||||||
json_object_free(json_paths);
|
|
||||||
if (rd) {
|
if (rd) {
|
||||||
vty_out(vty, " }%s ", (is_last ? "" : ","));
|
vty_out(vty, " }%s ", (is_last ? "" : ","));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user