diff options
Diffstat (limited to 'bgpd/bgp_ecommunity.c')
| -rw-r--r-- | bgpd/bgp_ecommunity.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 062a6477fa..d13da74b04 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -59,6 +59,9 @@ void ecommunity_strfree(char **s)  /* Allocate ecommunities.  */  void ecommunity_free(struct ecommunity **ecom)  { +	if (!(*ecom)) +		return; +  	XFREE(MTYPE_ECOMMUNITY_VAL, (*ecom)->val);  	XFREE(MTYPE_ECOMMUNITY_STR, (*ecom)->str);  	XFREE(MTYPE_ECOMMUNITY, *ecom);  | 
