opnsense-src/lib/libpfctl
Kristof Provost 7462817cd2 libpfctl: fix memory leak
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.

Explicitly reset the snl_state when we're done to prevent this.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fcb31b57112425a4eb64241651a0206108105298)
2026-07-06 11:10:29 +02:00
..
libpfctl.c libpfctl: fix memory leak 2026-07-06 11:10:29 +02:00
libpfctl.h pf: fix ICMP type/code representation 2025-09-02 23:10:19 +02:00
Makefile Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
Makefile.depend dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00