mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-01 12:47:16 +00:00
pimd: Dereference before null check
In pim_ecmp_nexthop_search: All paths that lead to this null pointer comparison already dereference the pointer earlier There may be a null pointer dereference, or else the comparison against null is unnecessary. Coverity CID-1519749 Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
parent
f13530f23a
commit
b6467a4274
@ -495,12 +495,13 @@ static int pim_ecmp_nexthop_search(struct pim_instance *pim,
|
||||
uint32_t hash_val = 0, mod_val = 0;
|
||||
uint8_t nh_iter = 0, found = 0;
|
||||
uint32_t i, num_nbrs = 0;
|
||||
pim_addr nh_addr = nexthop->mrib_nexthop_addr;
|
||||
pim_addr grp_addr = pim_addr_from_prefix(grp);
|
||||
|
||||
if (!pnc || !pnc->nexthop_num || !nexthop)
|
||||
return 0;
|
||||
|
||||
pim_addr nh_addr = nexthop->mrib_nexthop_addr;
|
||||
pim_addr grp_addr = pim_addr_from_prefix(grp);
|
||||
|
||||
memset(&nbrs, 0, sizeof(nbrs));
|
||||
memset(&ifps, 0, sizeof(ifps));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user