bgpd: Use lcommunity_new() to allocate new lcommunity

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
This commit is contained in:
Nigel Kukard 2017-09-01 02:01:55 +00:00
parent 3ac053e608
commit cb0c2da3a8

View File

@ -148,7 +148,7 @@ struct lcommunity *lcommunity_dup(struct lcommunity *lcom)
{
struct lcommunity *new;
new = XCALLOC(MTYPE_LCOMMUNITY, sizeof(struct lcommunity));
new = lcommunity_new();
new->size = lcom->size;
if (new->size) {
new->val = XMALLOC(MTYPE_LCOMMUNITY_VAL, lcom_length(lcom));