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")

(cherry picked from commit 43020350635150eeb439c035f608ec9e78ddff8f)

Details

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