diff options
| author | Sarita Patra <saritap@vmware.com> | 2021-01-12 02:46:35 -0800 |
|---|---|---|
| committer | Sarita Patra <saritap@vmware.com> | 2021-01-21 21:15:23 -0800 |
| commit | d5f20468407f6932669de731a0590b7e2854bc54 (patch) | |
| tree | 690f5901de75d4cd684541a5a508d21cab042c41 /lib/workqueue.c | |
| parent | 44ba9e779d6165222420904c6cbe7b16c9dc35b7 (diff) | |
bgpd : multiple memory leak fixes in show commands
Issue: bgpd got kill due to out of memory, when show bgp
neighbor json and show ip bgp neighbor <ip> routes json
commands executed multiple times in a setup having 320554
routes.
RCA: Heap allocated for bgpd keeps increasing. This is verified
using top command and show memory command.
Memleak Fix-1: show ip bgp route json command
When dumping a large bit of table data via bgp_show_route
and if there is no information to display for a particular
struct bgp_node *` the data allocated via json_object_new_array()
is not freed. This is resolved now.
Memleak Fix-2:
The function bgp_peer_counts() doesn't free the memory allocated for
json_loop when there is No such neighbor or address family. This is
fixed now.
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'lib/workqueue.c')
0 files changed, 0 insertions, 0 deletions
