]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix aspath memory leak in aggr_suppress_map_test
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 9 Feb 2022 22:20:03 +0000 (01:20 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 9 Feb 2022 22:20:03 +0000 (01:20 +0300)
aspth_empty a couple of lines earlier creates an aspath and it must be
freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bgpd/bgp_route.c

index ac70155f162a75b26b94a98d9b90d3d001e40204..6bef1b95258be77a1a457abb380fabe53aed2c42 100644 (file)
@@ -6942,6 +6942,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;
 }