summaryrefslogtreecommitdiff
path: root/bgpd/bgp_lcommunity.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_lcommunity.c')
-rw-r--r--bgpd/bgp_lcommunity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c
index f464e7122d..ad7cb36afe 100644
--- a/bgpd/bgp_lcommunity.c
+++ b/bgpd/bgp_lcommunity.c
@@ -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));