Potential memory leak with as-set and matching-MED-only config.
Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit
94ca6ddfae959a08e84a7a5a070f44ddba70f156)
* 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);
goto uninstall_aggregate_route;
+ }
if (aggregate->count > 0) {
/*