mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 14:28:07 +00:00
lib: vrf lookup may be NULL
The vrf lookup may be NULL, so let's protect against this. Found in coverity Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f935dca78f
commit
68a4422da4
2
lib/if.c
2
lib/if.c
@ -1585,7 +1585,7 @@ static const void *lib_interface_lookup_entry(const void *parent_list_entry,
|
||||
const char *vrfname = keys->key[1];
|
||||
struct vrf *vrf = vrf_lookup_by_name(vrfname);
|
||||
|
||||
return if_lookup_by_name(ifname, vrf->vrf_id);
|
||||
return vrf ? if_lookup_by_name(ifname, vrf->vrf_id) : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user