From bed55ecc8e8c4c4108c0cbf155c7044e20299079 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sun, 7 Jan 2024 15:55:15 -0500 Subject: [PATCH] bgpd: show_adj_route_vpn always leaked json memory Signed-off-by: Donald Sharp --- bgpd/bgp_vpn.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bgpd/bgp_vpn.c b/bgpd/bgp_vpn.c index b503f3f2f5e9..8fe24ebe20fc 100644 --- a/bgpd/bgp_vpn.c +++ b/bgpd/bgp_vpn.c @@ -30,7 +30,6 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer, int rd_header; int header = 1; json_object *json = NULL; - json_object *json_ocode = NULL; json_object *json_adv = NULL; json_object *json_routes = NULL; char rd_str[BUFSIZ]; @@ -46,13 +45,8 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer, } if (use_json) { - json_ocode = json_object_new_object(); json = json_object_new_object(); json_adv = json_object_new_object(); - - json_object_string_add(json_ocode, "igp", "i"); - json_object_string_add(json_ocode, "egp", "e"); - json_object_string_add(json_ocode, "incomplete", "?"); } for (dest = bgp_table_top(bgp->rib[afi][safi]); dest;