]> 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:54:08 +0000 (06:54 +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 766f026085ea02780c5f74bcb86926abec852636..b193c39c96e9aba4943d82dbb242472e2a08ab86 100644 (file)
@@ -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;
 }