mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
libpfctl: memory leak fix
We must remember to free the nvlist we create from the kernel's response
to DIOCGETSTATESNV, on every iteration.
Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30957
(cherry picked from commit 0e9f1892ec)
This commit is contained in:
parent
1882bdd192
commit
4debb6a3a0
1 changed files with 1 additions and 0 deletions
|
|
@ -727,6 +727,7 @@ pfctl_get_states(int dev, struct pfctl_states *states)
|
|||
goto out;
|
||||
}
|
||||
|
||||
nvlist_destroy(nvl);
|
||||
nvl = nvlist_unpack(nv.data, nv.len, 0);
|
||||
if (nvl == NULL) {
|
||||
error = EIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue