HomeFreeBSD

pf: fix state leak

Description

pf: fix state leak

If we hit the csfailed case in pf_create_state() we may have allocated
a state, so we must also free it. While here reduce the amount of
duplicated cleanup code.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D41772

(cherry picked from commit b6ce41118bb11d3db86eae8fbebc8c198e8b330d)

Details

Provenance
kpAuthored on Sep 6 2023, 7:58 AM
Differential Revision
D41772: pf: fix state leak
Parents
rG4df1447f2c76: arm64: Fix errata workarounds that depend on smccc
Branches
Unknown
Tags
Unknown