mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-24 16:33:40 +00:00
![]() Root Cause: In the function bgp_show_table(), we are creating a json object and a json array with the same name as “json_paths”. First it will create a json object variable "json_paths" pointing to the memory allocated for the json object. Then it will create a json array for each bap node rn (if rn->info is available) with the same name as json_paths. Because of this, json_paths which was pointing to the memory allocated for the json object earlier, now will be overwritten with the memory allocated for the json array. As per the existing code, at the end of each iteration loop of bgp node, it will deallocate the memory used by the json array and assigned NULL to the variable json_paths. Since we don’t have the pointer pointing to the memory allocated for json object, will be not able to de-allocate the memory, which is a memory leak here. Fix: Removing this json object since it is never getting used in this function. Testing: Reproduced the memory leak with valgrind. With the fix, memory leak gets resolved and checked with valgrind. Signed-off-by: Sarita Patra saritap@vmware.com |
||
---|---|---|
alpine | ||
babeld | ||
bfdd | ||
bgpd | ||
debianpkg | ||
doc | ||
docker | ||
eigrpd | ||
fpm | ||
gdb | ||
include | ||
init | ||
isisd | ||
ldpd | ||
lib | ||
m4 | ||
nhrpd | ||
ospf6d | ||
ospfclient | ||
ospfd | ||
pbrd | ||
pimd | ||
pkgsrc | ||
ports | ||
python | ||
qpb | ||
redhat | ||
ripd | ||
ripngd | ||
sharpd | ||
snapcraft | ||
solaris | ||
staticd | ||
tests | ||
tools | ||
vtysh | ||
watchfrr | ||
zebra | ||
.clang-format | ||
.dir-locals.el | ||
.dockerignore | ||
.gitignore | ||
AUTHORS | ||
bootstrap.sh | ||
buildtest.sh | ||
ChangeLog | ||
common.am | ||
configure.ac | ||
COPYING | ||
COPYING-LGPLv2.1 | ||
defaults.h | ||
Makefile.am | ||
NEWS | ||
README | ||
stamp-h.in |
FRRouting is free software that implements and manages various IPv4 and IPv6 routing protocols. Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng, IS-IS, PIM-SM/MSDP, LDP and Babel as well as very early support for EIGRP and NHRP. See doc/user/bugs.rst for information on how to report bugs. See doc/developer/workflow.rst for information on contributing. See the file COPYING for copying conditions. Public email discussion can be found at https://lists.frrouting.org/listinfo Our public slack channel is at https://frrouting.slack.com