]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Use lcommunity_new() to allocate new lcommunity
authorNigel Kukard <nkukard@lbsd.net>
Fri, 1 Sep 2017 02:01:55 +0000 (02:01 +0000)
committerNigel Kukard <nkukard@lbsd.net>
Fri, 1 Sep 2017 02:01:55 +0000 (02:01 +0000)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
bgpd/bgp_lcommunity.c

index f464e7122d12e94fe91bc86629987a494ce7c5ba..ad7cb36afeed6e4187111030e2db440b700ee732 100644 (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));