mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 09:30:30 +00:00
bgpd: Fix memory use after free
We were immediately using memory after it was freed. Fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
3292693b2f
commit
122eebd85a
@ -207,9 +207,9 @@ static void bgp_info_free(struct bgp_info *binfo)
|
|||||||
{
|
{
|
||||||
/* unlink reference to parent, if any. */
|
/* unlink reference to parent, if any. */
|
||||||
if (binfo->extra && binfo->extra->parent) {
|
if (binfo->extra && binfo->extra->parent) {
|
||||||
bgp_info_unlock((struct bgp_info *)binfo->extra->parent);
|
|
||||||
bgp_unlock_node((struct bgp_node *)((struct bgp_info *)binfo
|
bgp_unlock_node((struct bgp_node *)((struct bgp_info *)binfo
|
||||||
->extra->parent)->net);
|
->extra->parent)->net);
|
||||||
|
bgp_info_unlock((struct bgp_info *)binfo->extra->parent);
|
||||||
binfo->extra->parent = NULL;
|
binfo->extra->parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user