bgpd: fix memory leak in evpn mh (backport #19334) #19383
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
==361051== 96 bytes in 1 blocks are possibly lost in loss record 256 of 442
==361051== at 0x48465EF: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==361051== by 0x492A42F: qcalloc (memory.c:105)
==361051== by 0x2245A0: bgp_evpn_es_vrf_create (bgp_evpn_mh.c:3047)
==361051== by 0x2245A0: bgp_evpn_es_vrf_ref (bgp_evpn_mh.c:3156)
==361051== by 0x2246CD: bgp_evpn_es_evi_new (bgp_evpn_mh.c:3615)
==361051== by 0x22667A: bgp_evpn_local_es_evi_add (bgp_evpn_mh.c:3823)
==361051== by 0x2EA653: bgp_zebra_process_local_es_evi (bgp_zebra.c:3175)
==361051== by 0x4989F19: zclient_read (zclient.c:4668)
==361051== by 0x4974210: event_call (event.c:2034)
==361051== by 0x491DC0F: frr_run (libfrr.c:1242)
==361051== by 0x1F02E5: main (bgp_main.c:562)
==361051== 152 bytes in 1 blocks are possibly lost in loss record 316 of 442
==361051== at 0x48465EF: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==361051== by 0x492A42F: qcalloc (memory.c:105)
==361051== by 0x224673: bgp_evpn_es_evi_new (bgp_evpn_mh.c:3598)
==361051== by 0x22667A: bgp_evpn_local_es_evi_add (bgp_evpn_mh.c:3823)
==361051== by 0x2EA653: bgp_zebra_process_local_es_evi (bgp_zebra.c:3175)
==361051== by 0x4989F19: zclient_read (zclient.c:4668)
==361051== by 0x4974210: event_call (event.c:2034)
==361051== by 0x491DC0F: frr_run (libfrr.c:1242)
==361051== by 0x1F02E5: main (bgp_main.c:562)
Signed-off-by: Chirag Shah [email protected]
This is an automatic backport of pull request #19334 done by [Mergify](https://mergify.com).