Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: Fix memory leak for default-originate with route-map
``` Direct leak of 40 byte(s) in 1 object(s) allocated from: 0 0x7fc4b81eed28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) 1 0x7fc4b7bd60bb in qcalloc lib/memory.c:105 2 0x56221dc19207 in aspath_dup bgpd/bgp_aspath.c:689 3 0x56221daacd42 in route_set_aspath_prepend bgpd/bgp_routemap.c:2283 4 0x7fc4b7c3891a in route_map_apply_ext lib/routemap.c:2687 5 0x56221dace552 in subgroup_default_originate bgpd/bgp_updgrp_adv.c:906 6 0x56221dabf79c in update_group_default_originate_route_map_walkcb bgpd/bgp_updgrp.c:2105 7 0x56221dabde4e in update_group_walkcb bgpd/bgp_updgrp.c:1721 8 0x7fc4b7b9d398 in hash_walk lib/hash.c:270 9 0x56221dac94cb in update_group_af_walk bgpd/bgp_updgrp.c:2062 10 0x56221dac9b0f in update_group_walk bgpd/bgp_updgrp.c:2071 11 0x56221dac9fd5 in update_group_refresh_default_originate_route_map bgpd/bgp_updgrp.c:2118 12 0x7fc4b7c7fc54 in event_call lib/event.c:1974 13 0x7fc4b7bb9276 in frr_run lib/libfrr.c:1214 14 0x56221d9217fd in main bgpd/bgp_main.c:510 15 0x7fc4b6bf2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) ``` tmp_pi.attr should be flushed since it's already interned (new_attr) or the origin value is used (attr). Signed-off-by: Donatas Abraitis <[email protected]>
- Loading branch information