summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-02-24 19:17:20 -0500
committerGitHub <noreply@github.com>2023-02-24 19:17:20 -0500
commitbed7867117fe77d59d974d16b44b94a1542cf429 (patch)
treef45d4ef580238f53c652565350243b7cf30f19b1
parent68b48017ed1b7f507f01f8348c2386751de2cd38 (diff)
parent9930441c66131d26fd7c51d9684b9e6a228c38d7 (diff)
Merge pull request #12900 from opensourcerouting/fix/memory_leak_aspath_dup_astype
bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED
-rw-r--r--bgpd/bgp_attr.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 1e2698cd92..de77bd5304 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -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 {