From cb0c2da3a885d569d1db0092b5d19bb83d7d0cc0 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Fri, 1 Sep 2017 02:01:55 +0000 Subject: [PATCH] bgpd: Use lcommunity_new() to allocate new lcommunity Signed-off-by: Nigel Kukard --- bgpd/bgp_lcommunity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5