diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-01-10 08:47:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 08:47:21 +0100 |
commit | 35c0c827f28da3a468355ce633fdf324c39f0969 (patch) | |
tree | 73c5a47ae806a285c2c3b7756571e3b3cf99b886 /bgpd | |
parent | Merge pull request #17831 from Jafaral/ospf6-nodebug (diff) | |
parent | bgpd: fix memory leak in bgp_aggregate_install() (diff) | |
download | frr-35c0c827f28da3a468355ce633fdf324c39f0969.tar.xz frr-35c0c827f28da3a468355ce633fdf324c39f0969.zip |
Merge pull request #17811 from enkechen-panw/aggr-fix3
bgpd: fix memory leak in bgp_aggregate_install()
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_route.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index beb5f40b8..f520c2e2b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7962,8 +7962,15 @@ static void bgp_aggregate_install( * If we have paths with different MEDs, then don't install * (or uninstall) the aggregate route. */ - if (aggregate->match_med && aggregate->med_mismatched) + if (aggregate->match_med && aggregate->med_mismatched) { + aspath_free(aspath); + community_free(&community); + ecommunity_free(&ecommunity); + lcommunity_free(&lcommunity); + if (debug) + zlog_debug(" aggregate %pFX: med mismatch", p); goto uninstall_aggregate_route; + } if (aggregate->count > 0) { /* |