mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 18:42:23 +00:00
bgpd: fix a memleak on "set community none"
Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
9499bf2bc6
commit
b06b35f075
@ -1347,6 +1347,9 @@ route_set_community (void *rule, struct prefix *prefix,
|
||||
{
|
||||
attr->flag &= ~(ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES));
|
||||
attr->community = NULL;
|
||||
/* See the longer comment down below. */
|
||||
if (old && old->refcnt == 0)
|
||||
community_free(old);
|
||||
return RMAP_OKAY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user