diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-07-16 16:03:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-16 16:03:51 -0500 |
| commit | 3adfa0ce55f5fa62514e38981a3e38b67aa2a759 (patch) | |
| tree | 846678f4e1409dff1706befd09af0106c7bdd612 | |
| parent | a3fef414b6236e89d3fa02b444f16c9901d81021 (diff) | |
| parent | 9571a61a12c063a5c8ae2b05d5ec189eb84f18d6 (diff) | |
Merge pull request #11615 from opensourcerouting/fix/memory_leak_for_community
bgpd: Fix memory leak for community stuff
| -rw-r--r-- | bgpd/bgp_community.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |
