forked from Mirror/frr
bgpd: fix aggregate route AS Path attribute
Always free the locally allocated attribute not the one we are using for return. This fixes a memory leak and a crash when AS Path is set with route-map. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
08583527b2
commit
8bd0d3b1db
|
@ -1073,7 +1073,9 @@ struct attr *bgp_attr_aggregate_intern(
|
||||||
new = bgp_attr_intern(&attr);
|
new = bgp_attr_intern(&attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
aspath_unintern(&new->aspath);
|
/* Always release the 'intern()'ed AS Path. */
|
||||||
|
aspath_unintern(&attr.aspath);
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue