bgpd: memory leak issue fix

In ecommunity_del_val(), ecommunity was not being freed
when the last value in the ecommunity was being deleted.

Signed-off-by: Samanvitha B Bhargav <bsmanvitha@vmware.com>
This commit is contained in:
Samanvitha B Bhargav 2022-09-21 01:45:41 -07:00
parent f6a460f982
commit 92d537611b

View File

@ -1383,7 +1383,7 @@ bool ecommunity_del_val(struct ecommunity *ecom, struct ecommunity_val *eval)
XFREE(MTYPE_ECOMMUNITY_VAL, ecom->val);
ecom->val = p;
} else
ecom->val = NULL;
XFREE(MTYPE_ECOMMUNITY_VAL, ecom->val);
return true;
}