Page MenuHomeFreeBSD

pf: Fix more ioctl memory leaks
ClosedPublic

Authored by kp on Jun 1 2021, 2:20 PM.
Tags
None
Referenced Files
F131863046: D30595.id.diff
Sat, Oct 11, 7:11 PM
F131863044: D30595.id90258.diff
Sat, Oct 11, 7:11 PM
F131863042: D30595.id90285.diff
Sat, Oct 11, 7:11 PM
F131817314: D30595.diff
Sat, Oct 11, 10:18 AM
Unknown Object (File)
Sat, Oct 4, 7:04 PM
Unknown Object (File)
Sat, Sep 27, 6:38 AM
Unknown Object (File)
Tue, Sep 23, 12:29 PM
Unknown Object (File)
Sun, Sep 21, 1:24 AM

Details

Summary

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
Repored by: kib@
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable