]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Use correct memory type
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 16 Apr 2018 14:49:45 +0000 (10:49 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 25 Apr 2018 16:39:17 +0000 (12:39 -0400)
The usage of MTYPE_ECOMMUNITY for the free in ecommunity_del_val
caused the ref counts for the ecommunity to be incorrect.
Use MTYPE_ECOMMUNITY_VAL since that is what we are deleting.

Ticket: CM-20602
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_ecommunity.c

index 4df1b0103392b507b4b17f7effa167215779e45f..8eb0222a1bab31601ba8f963ee8f886ee52a1143 100644 (file)
@@ -927,7 +927,7 @@ int ecommunity_del_val(struct ecommunity *ecom, struct ecommunity_val *eval)
                memcpy(p + (c)*ECOMMUNITY_SIZE,
                       ecom->val + (c + 1) * ECOMMUNITY_SIZE,
                       (ecom->size - c) * ECOMMUNITY_SIZE);
-       XFREE(MTYPE_ECOMMUNITY, ecom->val);
+       XFREE(MTYPE_ECOMMUNITY_VAL, ecom->val);
        ecom->val = p;
        return 1;
 }