]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix aspath memory leak
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 8 Sep 2021 18:08:08 +0000 (21:08 +0300)
committermergify-bot <noreply@mergify.io>
Thu, 16 Sep 2021 10:51:58 +0000 (10:51 +0000)
We allocate an as-path using bgp_attr_default_set and should free it
before exiting the function.

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

bgpd/bgp_updgrp_adv.c

index 9a99ce26cefa0591278522017bc805a41c92f120..365cc29268ab108bb993d31f25e1693dc452d5cf 100644 (file)
@@ -934,6 +934,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
                        subgroup_default_update_packet(subgrp, new_attr, from);
                }
        }
+
+       aspath_unintern(&attr.aspath);
 }
 
 /*