H A D | pf_nv.c | diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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 diff 0f86492b Tue Jun 01 14:05:47 GMT 2021 Kristof Provost <kp@FreeBSD.org> 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
|