mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:49:18 +00:00
Merge pull request #14906 from Keelan10/bgp_confederation-leak
bgpd: Free Memory for confed_peers in bgp_free
This commit is contained in:
commit
4aff978cee
@ -4060,10 +4060,14 @@ void bgp_free(struct bgp *bgp)
|
|||||||
bgp_srv6_cleanup(bgp);
|
bgp_srv6_cleanup(bgp);
|
||||||
bgp_confederation_id_unset(bgp);
|
bgp_confederation_id_unset(bgp);
|
||||||
|
|
||||||
|
for (int i = 0; i < bgp->confed_peers_cnt; i++)
|
||||||
|
XFREE(MTYPE_BGP_NAME, bgp->confed_peers[i].as_pretty);
|
||||||
|
|
||||||
XFREE(MTYPE_BGP_NAME, bgp->as_pretty);
|
XFREE(MTYPE_BGP_NAME, bgp->as_pretty);
|
||||||
XFREE(MTYPE_BGP_NAME, bgp->name);
|
XFREE(MTYPE_BGP_NAME, bgp->name);
|
||||||
XFREE(MTYPE_BGP_NAME, bgp->name_pretty);
|
XFREE(MTYPE_BGP_NAME, bgp->name_pretty);
|
||||||
XFREE(MTYPE_BGP_NAME, bgp->snmp_stats);
|
XFREE(MTYPE_BGP_NAME, bgp->snmp_stats);
|
||||||
|
XFREE(MTYPE_BGP_CONFED_LIST, bgp->confed_peers);
|
||||||
|
|
||||||
XFREE(MTYPE_BGP, bgp);
|
XFREE(MTYPE_BGP, bgp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user