Skip to content

Commit

Permalink
Merge pull request #16441 from FRRouting/mergify/bp/dev/10.1/pr-16437
Browse files Browse the repository at this point in the history
bgpd: backpressure - Avoid use after free (backport #16437)
  • Loading branch information
ton31337 authored Jul 23, 2024
2 parents 743eecd + 4c68489 commit 5bc6621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -6338,9 +6338,9 @@ void bgp_evpn_free(struct bgp *bgp, struct bgpevpn *vpn)
dest = dest_next) {
dest_next = zebra_announce_next(&bm->zebra_announce_head, dest);
if (dest->za_vpn == vpn) {
zebra_announce_del(&bm->zebra_announce_head, dest);
bgp_path_info_unlock(dest->za_bgp_pi);
bgp_dest_unlock_node(dest);
zebra_announce_del(&bm->zebra_announce_head, dest);
}
}

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3930,9 +3930,9 @@ int bgp_delete(struct bgp *bgp)
dest_next = zebra_announce_next(&bm->zebra_announce_head, dest);
dest_table = bgp_dest_table(dest);
if (dest_table->bgp == bgp) {
zebra_announce_del(&bm->zebra_announce_head, dest);
bgp_path_info_unlock(dest->za_bgp_pi);
bgp_dest_unlock_node(dest);
zebra_announce_del(&bm->zebra_announce_head, dest);
}
}

Expand Down

0 comments on commit 5bc6621

Please sign in to comment.