]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Prevent crash when displaying json of a vrf all command
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Aug 2020 17:54:03 +0000 (13:54 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Aug 2020 17:54:03 +0000 (13:54 -0400)
commit121067e9c598f44f62bf9e11774fd100ca5ce8a9
tree80381f751b23c5487795fdf2aa5b30c8ad04f7ef
parentf088c4e77db8d31d9d1c5f8f027acc84cde0b28d
bgpd: Prevent crash when displaying json of a vrf all command

When iterating over a `show ip bgp vrf all neighbors json` command
bgp is crashing.

The json variable was being double freed.  When freeing it, set it
to NULL and then check to make sure it exists before we free.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_vty.c