Page MenuHomeFreeBSD

axgbe: Don't dereference NULL pointers

Authored by imp on May 21 2021, 4:51 AM.



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.

Sponsored by: Netflix

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp requested review of this revision.May 21 2021, 4:51 AM
imp created this revision.
This revision is now accepted and ready to land.May 21 2021, 4:09 PM
allanjude added a subscriber: allanjude.

Reviewed By: allanjude

This revision was automatically updated to reflect the committed changes.