HomeFreeBSD

inpcb: Remove NULL checks of credential references

Description

inpcb: Remove NULL checks of credential references

Some auditing of the code shows that "cred" is never non-NULL in these
functions, either because all callers pass a non-NULL reference or
because they unconditionally dereference "cred". So, let's simplify the
code a bit and remove NULL checks. No functional change intended.

Reviewed by: glebius
MFC after: 1 week
Sponsored by: Modirum MDPay
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37025

(cherry picked from commit ac1750dd143e53225c518bc1ca0462c3fffe10f6)

Details

Provenance
markjAuthored on Nov 2 2022, 5:03 PM
Reviewer
glebius
Differential Revision
D37025: inpcb: Remove checks for NULL credential references
Parents
rG166bc357c6a4: routing: plug mbuf leak for the packets hitting IPv6 blackhole route
Branches
Unknown
Tags
Unknown