From 600d7ff8741f0225064f34739cef776619b3c8f7 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Sun, 3 Sep 2017 05:20:48 +0000 Subject: [PATCH] bgpd: Fixed incorrect MTYPE being used for large communites Signed-off-by: Nigel Kukard --- bgpd/bgp_lcommunity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index ad7cb36afe..395ae52712 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -523,10 +523,10 @@ void lcommunity_del_val(struct lcommunity *lcom, u_char *ptr) if (lcom->size > 0) lcom->val = - XREALLOC(MTYPE_COMMUNITY_VAL, lcom->val, + XREALLOC(MTYPE_LCOMMUNITY_VAL, lcom->val, lcom_length(lcom)); else { - XFREE(MTYPE_COMMUNITY_VAL, lcom->val); + XFREE(MTYPE_LCOMMUNITY_VAL, lcom->val); lcom->val = NULL; } return; -- 2.39.5