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

Details

Provenance
kpAuthored on Sat, Nov 9, 9:53 AM
Parents
rGfc595a6b7664: Fix "vrefact: wrong use count 0" with DRM
Branches
Unknown
Tags
Unknown