]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_ecommunity.c
*: Add a hash_clean_and_free() function
[mirror_frr.git] / bgpd / bgp_ecommunity.c
index 0a4ebc5130857cf3ec6997aa446edd59f79105b7..541da9ecd6886edd97270962401fe5c525f2069b 100644 (file)
@@ -364,9 +364,7 @@ void ecommunity_init(void)
 
 void ecommunity_finish(void)
 {
-       hash_clean(ecomhash, (void (*)(void *))ecommunity_hash_free);
-       hash_free(ecomhash);
-       ecomhash = NULL;
+       hash_clean_and_free(&ecomhash, (void (*)(void *))ecommunity_hash_free);
 }
 
 /* Extended Communities token enum. */