]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix SA warning about freeing an aspath
authorMark Stapp <mjs@voltanet.io>
Thu, 24 Jun 2021 11:50:23 +0000 (07:50 -0400)
committerMark Stapp <mjs@voltanet.io>
Thu, 24 Jun 2021 11:50:23 +0000 (07:50 -0400)
Fix coverity warning CID 1505589

Signed-off-by: Mark Stapp <mjs@voltanet.io>
bgpd/bgp_updgrp_adv.c

index 4dd7597e5f74af791d1a94a582a117d059b4cccd..18829aa7477a944debe9e28d48da67d9df2f64ff 100644 (file)
@@ -839,6 +839,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
                                        bgp_dest_get_prefix(dest), &tmp_pi);
 
                                if (ret == RMAP_DENYMATCH) {
+                                       /* The aspath belongs to 'attr' */
+                                       tmp_attr.aspath = NULL;
                                        bgp_attr_flush(&tmp_attr);
                                        continue;
                                } else {