HomeFreeBSD

axgbe: Don't dereference NULL pointers

Description

axgbe: Don't dereference NULL pointers

if (sb == NULL) { ... sb->s_error } is going to be a bad time. Return
ENOMEM when we cannot allocate an sbuf for the sysctl rather than
dereferencing the NULL pointer just returned.

Reviewed by: manu@, allanjude@
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30373

Details

Provenance
impAuthored on Jun 3 2021, 6:03 PM
Differential Revision
D30373: axgbe: Don't dereference NULL pointers
Parents
rGef65f7bdf26e: mmc:: Undo my conversion of (bool) to !!.
Branches
Unknown
Tags
Unknown