diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index 78cf9ea76c..9f6f337c88 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -914,8 +914,16 @@ void community_init(void) "BGP Community Hash"); } +static void community_hash_free(void *data) +{ + struct community *com = data; + + community_free(&com); +} + void community_finish(void) { + hash_clean(comhash, community_hash_free); hash_free(comhash); comhash = NULL; }