HomeFreeBSD

pfsync: NULL check before dereference

Description

pfsync: NULL check before dereference

Move the use of 'sc' to after the NULL check.
It's very unlikely that we'd actually hit this, but Coverity is correct
that it's not a good idea to dereference the pointer and only then NULL
check it.

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

Details

Provenance
kpAuthored on Apr 21 2022, 12:40 PM
Parents
rGed6287c14168: pf: remove pointless NULL check
Branches
Unknown
Tags
Unknown