]> 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)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 8 Sep 2021 20:37:50 +0000 (23:37 +0300)
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>
bgpd/bgp_updgrp_adv.c

index 2b1f18679028727a7554ec61caa4418187ed08a4..3b7ee8b0b621d1d4e22f1558b5b11a8da0f772ff 100644 (file)
@@ -935,6 +935,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
                        subgroup_default_update_packet(subgrp, new_attr, from);
                }
        }
+
+       aspath_unintern(&attr.aspath);
 }
 
 /*