Skip to content
Permalink
Browse files

Merge pull request #2890 from patrasar/Fix_2847

bgpd: Fix memory leak show ip bgp json
  • Loading branch information...
donaldsharp committed Aug 22, 2018
2 parents 61929aa + b2a9fc6 commit ff7f6cd82999cd674a98232c7073937da84bd27c
Showing with 0 additions and 3 deletions.
  1. +0 −3 bgpd/bgp_route.c
@@ -8202,7 +8202,6 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
vty_out(vty, " \"routeDistinguishers\" : {");
++*json_header_depth;
}
json_paths = json_object_new_object();
}

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;
}
if (use_json) {
if (json_paths)
json_object_free(json_paths);
if (rd) {
vty_out(vty, " }%s ", (is_last ? "" : ","));
}

0 comments on commit ff7f6cd

Please sign in to comment.
You can’t perform that action at this time.