HomeFreeBSD

pf: Fix more ioctl memory leaks

Description

pf: Fix more ioctl memory leaks

We must also remember to free nvlists added to a parent nvlist with
nvlist_append_nvlist_array().

More importantly, when nvlist_pack() allocates memory for us it does so
in the M_NVLIST zone, so we must free it with free(.., M_NVLIST). Using
free(.., M_TEMP) as we did silently failed to free the memory.

MFC after: 3 days
Reported by: kib@
Tested by: kib@
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30595

(cherry picked from commit 0f86492b09ca82042166a41f6f21b2dbe4f4a464)

Details

Provenance
kpAuthored on Jun 1 2021, 2:05 PM
Differential Revision
D30595: pf: Fix more ioctl memory leaks
Parents
rG5713766d6317: nfsd: Add support for CLAIM_DELEG_PREV_FH to the NFSv4.1/4.2 Open
Branches
Unknown
Tags
Unknown