mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:47:47 +00:00
zebra: add null check before connecting recursive depend
Add a null check in `handle_recursive_depend()` so it doesn't try to add a NULL pointer to the RB tree. This was found with clang SA. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
c8b891b483
commit
a7e1b02d4a
@ -510,7 +510,9 @@ static void handle_recursive_depend(struct nhg_connected_tree_head *nhg_depends,
|
|||||||
resolved_ng.nexthop = nh;
|
resolved_ng.nexthop = nh;
|
||||||
|
|
||||||
depend = zebra_nhg_rib_find(0, &resolved_ng, afi);
|
depend = zebra_nhg_rib_find(0, &resolved_ng, afi);
|
||||||
depends_add(nhg_depends, depend);
|
|
||||||
|
if (depend)
|
||||||
|
depends_add(nhg_depends, depend);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool zebra_nhg_find(struct nhg_hash_entry **nhe, uint32_t id,
|
static bool zebra_nhg_find(struct nhg_hash_entry **nhe, uint32_t id,
|
||||||
|
Loading…
Reference in New Issue
Block a user