diff options
Diffstat (limited to 'bgpd/bgp_community.c')
| -rw-r--r-- | bgpd/bgp_community.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index 614e24ca4f..040fcabbe6 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -41,10 +41,8 @@ static struct community *community_new(void) /* Free communities value. */ void community_free(struct community **com) { - if ((*com)->val) - XFREE(MTYPE_COMMUNITY_VAL, (*com)->val); - if ((*com)->str) - XFREE(MTYPE_COMMUNITY_STR, (*com)->str); + XFREE(MTYPE_COMMUNITY_VAL, (*com)->val); + XFREE(MTYPE_COMMUNITY_STR, (*com)->str); if ((*com)->json) { json_object_free((*com)->json); |
