]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix memory leak in evpn json outpus II
authorChirag Shah <chirag@cumulusnetworks.com>
Mon, 27 Jan 2020 18:41:22 +0000 (10:41 -0800)
committerChirag Shah <chirag@cumulusnetworks.com>
Mon, 27 Jan 2020 19:07:02 +0000 (11:07 -0800)
commit24882500ff0f6c84afd73916ffb2b69a3a76008f
tree693b6154a92d93595f58ffbfba6ea715e983c235
parent3812117bfcc154ee2dc50dc4cc2512545c872013
bgpd: fix memory leak in evpn json outpus II

Two of the evpn show commands with json option has memory leak.
1) show bgp l2vpn evpn route vni all json
2) show bgp l2vpn evpn route esi json

Before fix:
----------
Executed 'show bgp l2vpn evpn route vni all json' multiple times
used ordinary blocks continue to increase.

Note at the time of show command capture there were 22 evpn routes
in vni evpn route table.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  9152 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  7300 KiB
  Free small blocks:     1760 bytes
  Free ordinary blocks:  1852 KiB
  Ordinary blocks:       880
  Small blocks:          51
  Holding blocks:        0

Ticket:CM-27920
Reviewed By:
Testing Done:

After fix:
---------
Executed 'show bgp l2vpn evpn route vni all json' multiple times
Used ordinary blocks remains low.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  8356 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  6492 KiB
  Free small blocks:     1840 bytes
  Free ordinary blocks:  1864 KiB
  Ordinary blocks:       939
  Small blocks:          52
  Holding blocks:        0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_evpn_vty.c