From 5b89ade9b10d8646d7216de273e3283a0968b315 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Thu, 10 Feb 2022 01:20:03 +0300 Subject: [PATCH] bgpd: fix aspath memory leak in aggr_suppress_map_test aspth_empty a couple of lines earlier creates an aspath and it must be freed. Signed-off-by: Igor Ryzhov (cherry picked from commit afb254d79235e4a4cf41e761d7c99c030069758b) --- bgpd/bgp_route.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 766f026085..b193c39c96 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6774,6 +6774,7 @@ static bool aggr_suppress_map_test(struct bgp *bgp, bgp->peer_self->rmap_type = 0; bgp_attr_flush(&attr); + aspath_unintern(&attr.aspath); return rmr == RMAP_PERMITMATCH; } -- 2.39.5