HomeFreeBSD

libpfctl: fix memory leak

Description

libpfctl: fix memory leak

When we create an nvlist and insert it into another nvlist we must
remember to destroy it. The nvlist_add_nvlist() function makes a copy,
just like nvlist_add_string() makes a copy of the string.

See also 4483fb47735c29408c72045469c9c4b3e549668b

Reviewed by: scottl
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30492

(cherry picked from commit 6dbb729d35d59cc8bc8451bd56f220f9c35a43f3)

Details

Provenance
kpAuthored on May 27 2021, 9:28 AM
Reviewer
scottl
Differential Revision
D30492: libpfctl: fix memory leak
Parents
rGfcf938e09396: tcp, udp: Permit binding with AF_UNSPEC if the address is INADDR_ANY
Branches
Unknown
Tags
Unknown