]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_vty.c
bgpd: resolve memleak on show bgp vrf all ipv6 unicast summary json
authorDon Slice <dslice@cumulusnetworks.com>
Wed, 31 Jul 2019 16:38:49 +0000 (12:38 -0400)
committerDon Slice <dslice@cumulusnetworks.com>
Fri, 2 Aug 2019 11:50:46 +0000 (04:50 -0700)
commitf86897b945bdb840db85d26ce4bc38b469ca4da6
treea24fab89709234357451fb814f8447a64daacd98
parentdaeca91f7c228eec8039563daf3ce023516282dc
bgpd: resolve memleak on show bgp vrf all ipv6 unicast summary json

Problem reported with memory leak when the command "show bgp vrf all
ipv6 unicast summary json" is issued.  Found that the problem only
occurs if the configuration does not actually include the ipv6
address-family but does contain ipv4 unicast peers. If we didn't
match a peer in the address-family being displayed, we would create
the json object but never free it.  This fix actually stops creating
the json object in this section of code and lets the create happen
in the area where the match occurs.

Ticket: CM-25616
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
bgpd/bgp_vty.c