diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-11-02 11:20:32 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-11-15 09:39:25 -0500 | 
| commit | df7d4670ea9dd8aa35457abeb5827e074cca7514 (patch) | |
| tree | 871234aa0147e564247db7af2eab13a43fa81890 /bgpd/bgp_ecommunity.c | |
| parent | cdb8f3e4789d4e8ce15256547cbca57114095295 (diff) | |
bgpd: Allow NULL to be passed in for ecommunity_free
Allow some cleanup of if statements to just make
ecommunity_free() check this.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
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 de3757aebb..74cbf3a80a 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -327,6 +327,9 @@ void ecommunity_unintern(struct ecommunity **ecom)  {  	struct ecommunity *ret; +	if (!*ecom) +		return; +  	if ((*ecom)->refcnt)  		(*ecom)->refcnt--;  | 
