HomeFreeBSD

pf: fix potential state key leak

Description

pf: fix potential state key leak

If we fail to attach the new state keys in pf_state_key_attach() we are
expected to free both keys. Do so.
Note that in some scenarios both key are the same, so check for that
before freeing.

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

(cherry picked from commit 371bd29d4b22257a7e92e1e711cca3d94cfbd00d)

Details

Provenance
kpAuthored on Nov 9 2024, 9:53 AM
Differential Revision
D47495: pf: fix potential state key leak
Parents
rG87a1f9e8df1e: e1000: Try auto-negotiation for fixed 100 or 10 configuration
Branches
Unknown
Tags
Unknown