Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 ff7f6cd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions bgpd/bgp_route.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 ? "" : ","));
} }
Expand Down

0 comments on commit ff7f6cd

Please sign in to comment.