mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 15:16:20 +00:00
Merge pull request #2547 from pacovn/Coverity_1458168_Dereference_null_return_value
eigrpd ospfd: null check (Coverity 1458168 1455335)
This commit is contained in:
commit
884cc57a96
@ -448,6 +448,8 @@ void eigrp_topology_update_node_flags(struct eigrp_prefix_entry *dest)
|
||||
struct eigrp_nexthop_entry *entry;
|
||||
struct eigrp *eigrp = eigrp_lookup();
|
||||
|
||||
assert(eigrp);
|
||||
|
||||
for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) {
|
||||
if (entry->reported_distance < dest->fdistance) {
|
||||
// is feasible successor, can be successor
|
||||
|
@ -243,13 +243,14 @@ static struct ospf *ospf_new(unsigned short instance, const char *name)
|
||||
zlog_debug(
|
||||
"%s: Create new ospf instance with vrf_name %s vrf_id %u",
|
||||
__PRETTY_FUNCTION__, name, new->vrf_id);
|
||||
if (vrf)
|
||||
ospf_vrf_link(new, vrf);
|
||||
} else {
|
||||
new->vrf_id = VRF_DEFAULT;
|
||||
vrf = vrf_lookup_by_id(VRF_DEFAULT);
|
||||
ospf_vrf_link(new, vrf);
|
||||
}
|
||||
|
||||
if (vrf)
|
||||
ospf_vrf_link(new, vrf);
|
||||
|
||||
ospf_zebra_vrf_register(new);
|
||||
|
||||
new->abr_type = OSPF_ABR_DEFAULT;
|
||||
|
Loading…
Reference in New Issue
Block a user