summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_updgrp_adv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index cc039e3e11..e70713bb68 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -854,6 +854,7 @@ void subgroup_default_originate(struct update_subgroup *subgrp, bool withdraw)
struct bgp *bgp;
struct attr attr;
struct attr *new_attr = &attr;
+ struct aspath *aspath;
struct prefix p;
struct peer *from;
struct bgp_dest *dest;
@@ -891,6 +892,7 @@ void subgroup_default_originate(struct update_subgroup *subgrp, bool withdraw)
/* make coverity happy */
assert(attr.aspath);
+ aspath = attr.aspath;
attr.med = 0;
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
@@ -1046,7 +1048,7 @@ void subgroup_default_originate(struct update_subgroup *subgrp, bool withdraw)
}
}
- aspath_unintern(&attr.aspath);
+ aspath_unintern(&aspath);
}
/*