Merge pull request #14578 from opensourcerouting/fix/coverity_1566808

bgpd: Remove redundant check for bgp against NULL
This commit is contained in:
Donald Sharp 2023-10-12 15:58:08 -04:00 committed by GitHub
commit 202a0f7c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1225,8 +1225,9 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
new->extra->vrfleak->parent = bgp_path_info_lock(parent);
bgp_dest_lock_node(
(struct bgp_dest *)parent->net);
if (bgp_orig)
new->extra->vrfleak->bgp_orig = bgp_lock(bgp_orig);
new->extra->vrfleak->bgp_orig = bgp_lock(bgp_orig);
if (nexthop_orig)
new->extra->vrfleak->nexthop_orig = *nexthop_orig;