HomeFreeBSD

pf: counter argument to pfr_pool_get() may never be NULL

Description

pf: counter argument to pfr_pool_get() may never be NULL

Coverity points out that if counter was NULL when passed to
pfr_pool_get() we could potentially end up dereferencing it.
Happily all users of the function pass a non-NULL pointer. Enforce this
by assertion and remove the pointless NULL check.

Reported by: Coverity (CID 273309)
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on Apr 21 2022, 12:53 PM
Parents
rG430203506351: pfsync: NULL check before dereference
Branches
Unknown
Tags
Unknown