From b77004d63213111525727ec6974899b441b6aca9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 28 Nov 2018 18:21:08 -0500 Subject: [PATCH] bgpd: Fix crash in various 'show bgp neighbor json' commands bgp would crash with various `show bgp neighbor json` commands based upon whether or not it did a pretty print of the output or not. This is because we were freeing the data 2 times. Cleanup so that we free the json data 1 time. Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 2da19b28db..e8610b0168 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -11007,6 +11007,7 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty, bgp_show_neighbor(vty, bgp, show_all, NULL, NULL, use_json, json); } + json_object_free(json); } if (use_json) { -- 2.39.5