mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 08:56:13 +00:00
zebra: fix static analysis issue with zvrf_id
Using c-lang scan-build tool, fix a dereference of a null pointer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
5895d33f40
commit
2c7d402164
@ -128,6 +128,8 @@ struct zebra_vrf {
|
||||
|
||||
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
|
||||
{
|
||||
if (!zvrf || !zvrf->vrf)
|
||||
return VRF_UNKNOWN;
|
||||
return zvrf->vrf->vrf_id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user