freebsd11_network: Add NULL check to if_getdrvflags.
This is the proper fix for #14182, as discussed on the mailing list.
This commit is contained in:
parent
ac3431d6e1
commit
4c00d515f1
@ -1052,6 +1052,8 @@ if_setdrvflagbits(if_t ifp, int set_flags, int clear_flags)
|
|||||||
int
|
int
|
||||||
if_getdrvflags(if_t ifp)
|
if_getdrvflags(if_t ifp)
|
||||||
{
|
{
|
||||||
|
if ((struct ifnet *)ifp == NULL)
|
||||||
|
return 0;
|
||||||
return ((struct ifnet *)ifp)->if_drv_flags;
|
return ((struct ifnet *)ifp)->if_drv_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user