]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: show_adj_route_vpn always leaked json memory 15111/head
authorDonald Sharp <sharpd@nvidia.com>
Sun, 7 Jan 2024 20:55:15 +0000 (15:55 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 7 Jan 2024 20:55:15 +0000 (15:55 -0500)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_vpn.c

index b503f3f2f5e9ea2e84b7000179734611137cf2ce..8fe24ebe20fc892fe495c59d1b9aa898516a4768 100644 (file)
@@ -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;