]> 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)
committermergify-bot <noreply@mergify.com>
Thu, 10 Feb 2022 06:53:50 +0000 (06:53 +0000)
aspth_empty a couple of lines earlier creates an aspath and it must be
freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit afb254d79235e4a4cf41e761d7c99c030069758b)

bgpd/bgp_route.c

index 9c8b72791f3b8bb4d4805ac0af3553f967764c15..4864089f8a5dd576946a08fd35b2e1bba1a37825 100644 (file)
@@ -6936,6 +6936,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;
 }