mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 15:07:51 +00:00
bgpd: fix ecommunity hash related leak
Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
parent
bede774450
commit
7bae2fb913
@ -54,6 +54,13 @@ ecommunity_free (struct ecommunity **ecom)
|
|||||||
ecom = NULL;
|
ecom = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ecommunity_hash_free (struct ecommunity *ecom)
|
||||||
|
{
|
||||||
|
ecommunity_free(&ecom);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Add a new Extended Communities value to Extended Communities
|
/* Add a new Extended Communities value to Extended Communities
|
||||||
Attribute structure. When the value is already exists in the
|
Attribute structure. When the value is already exists in the
|
||||||
structure, we don't add the value. Newly added value is sorted by
|
structure, we don't add the value. Newly added value is sorted by
|
||||||
@ -282,6 +289,7 @@ ecommunity_init (void)
|
|||||||
void
|
void
|
||||||
ecommunity_finish (void)
|
ecommunity_finish (void)
|
||||||
{
|
{
|
||||||
|
hash_clean (ecomhash, (void (*)(void *))ecommunity_hash_free);
|
||||||
hash_free (ecomhash);
|
hash_free (ecomhash);
|
||||||
ecomhash = NULL;
|
ecomhash = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user