]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix crash in various 'show bgp neighbor json' commands
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 23:21:08 +0000 (18:21 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 26 Jan 2019 01:28:23 +0000 (20:28 -0500)
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 <sharpd@cumulusnetworks.com>
bgpd/bgp_vty.c

index 2da19b28db32a3fdf1ce0de5f4d81787f8562dc4..e8610b0168b09265a74c7c08ed0dacbc300c4a4e 100644 (file)
@@ -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) {