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

Details

Provenance
kpAuthored on Sep 6 2023, 7:58 AM
Differential Revision
D41772: pf: fix state leak
Parents
rG898496ee09ed: MFV: file 5.45.
Branches
Unknown
Tags
Unknown