]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Fix memory leak for community stuff 11620/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sat, 16 Jul 2022 13:26:13 +0000 (16:26 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 16 Jul 2022 21:04:33 +0000 (21:04 +0000)
commitfd34cf8f557a767cfadf2924335caff0c6ccfb7a
tree1e2d25ae95c42d37c762d07612c4bb23a7bcf4b0
parent2a1b7d55a24b39149b3569f306dd95010ac9e8f7
bgpd: Fix memory leak for community stuff

Do not forget to cleanup after we are done:

==395247== 8,268 (32 direct, 8,236 indirect) bytes in 1 blocks are definitely lost in loss record 199 of 205
==395247==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==395247==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x490BB12: hash_get (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x1FBF63: community_intern (in /usr/lib/frr/bgpd)
==395247==    by 0x1FC0C5: community_parse (in /usr/lib/frr/bgpd)
==395247==    by 0x1F0B66: bgp_attr_community (in /usr/lib/frr/bgpd)
==395247==    by 0x1F4185: bgp_attr_parse (in /usr/lib/frr/bgpd)
==395247==    by 0x26BC29: bgp_update_receive (in /usr/lib/frr/bgpd)
==395247==    by 0x26E887: bgp_process_packet (in /usr/lib/frr/bgpd)
==395247==    by 0x4985380: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==395247==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 9571a61a12c063a5c8ae2b05d5ec189eb84f18d6)
bgpd/bgp_community.c