summaryrefslogtreecommitdiff
path: root/bgpd/bgp_lcommunity.c
diff options
context:
space:
mode:
authorNigel Kukard <nkukard@lbsd.net>2017-09-01 02:01:55 +0000
committerNigel Kukard <nkukard@lbsd.net>2017-09-01 02:01:55 +0000
commitcb0c2da3a885d569d1db0092b5d19bb83d7d0cc0 (patch)
tree2fb12ed75dec23501cfd9c58e3d1810a0a9e3b05 /bgpd/bgp_lcommunity.c
parent3ac053e608b63041afbf0080f03670d4b56e7fef (diff)
bgpd: Use lcommunity_new() to allocate new lcommunity
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
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));