diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 20:18:13 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 23:00:46 +0000 |
| commit | 0a22ddfbb16a61c3e068ea1164e885104366112a (patch) | |
| tree | 5aeaef43b3de5ebbdfcf1015421eb48b51a071fb /bgpd/bgp_lcommunity.c | |
| parent | 1383ff9c51dd58ed84021fafb14f7c2e27b7666b (diff) | |
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_lcommunity.c')
| -rw-r--r-- | bgpd/bgp_lcommunity.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index 9934ab4c13..fcf2a3b57c 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -45,10 +45,8 @@ static struct lcommunity *lcommunity_new(void) /* Allocate lcommunities. */ void lcommunity_free(struct lcommunity **lcom) { - if ((*lcom)->val) - XFREE(MTYPE_LCOMMUNITY_VAL, (*lcom)->val); - if ((*lcom)->str) - XFREE(MTYPE_LCOMMUNITY_STR, (*lcom)->str); + XFREE(MTYPE_LCOMMUNITY_VAL, (*lcom)->val); + XFREE(MTYPE_LCOMMUNITY_STR, (*lcom)->str); XFREE(MTYPE_LCOMMUNITY, *lcom); } |
