Merge pull request #12900 from opensourcerouting/fix/memory_leak_aspath_dup_astype

bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED
This commit is contained in:
Donald Sharp 2023-02-24 19:17:20 -05:00 committed by GitHub
commit bed7867117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4312,7 +4312,6 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
* if the peer belongs to us.
*/
if (bgp_confederation_peers_check(bgp, peer->as)) {
aspath = aspath_dup(attr->aspath);
aspath = aspath_add_confed_seq(aspath,
peer->local_as);
} else {