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_clist.c | |
| parent | 1383ff9c51dd58ed84021fafb14f7c2e27b7666b (diff) | |
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_clist.c')
| -rw-r--r-- | bgpd/bgp_clist.c | 9 | 
1 files changed, 3 insertions, 6 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 84a00488c1..7b64f349d2 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -100,16 +100,14 @@ static void community_entry_free(struct community_entry *entry)  	case EXTCOMMUNITY_LIST_STANDARD:  		/* In case of standard extcommunity-list, configuration string  		   is made by ecommunity_ecom2str().  */ -		if (entry->config) -			XFREE(MTYPE_ECOMMUNITY_STR, entry->config); +		XFREE(MTYPE_ECOMMUNITY_STR, entry->config);  		if (entry->u.ecom)  			ecommunity_free(&entry->u.ecom);  		break;  	case COMMUNITY_LIST_EXPANDED:  	case EXTCOMMUNITY_LIST_EXPANDED:  	case LARGE_COMMUNITY_LIST_EXPANDED: -		if (entry->config) -			XFREE(MTYPE_COMMUNITY_LIST_CONFIG, entry->config); +		XFREE(MTYPE_COMMUNITY_LIST_CONFIG, entry->config);  		if (entry->reg)  			bgp_regex_free(entry->reg);  	default: @@ -127,8 +125,7 @@ static struct community_list *community_list_new(void)  /* Free community-list.  */  static void community_list_free(struct community_list *list)  { -	if (list->name) -		XFREE(MTYPE_COMMUNITY_LIST_NAME, list->name); +	XFREE(MTYPE_COMMUNITY_LIST_NAME, list->name);  	XFREE(MTYPE_COMMUNITY_LIST, list);  }  | 
