opnsense-src/usr.sbin/syslogd
Mark Johnston 526bd072b3 syslogd: Fix resource leaks
- nvlist_append_nvlist_array() makes a copy of the input nvlist, so the
  pattern of nvlist_append_nvlist_array(... cfline(...)) would leak
  memory and descriptors.  Pass the entire config nvlist to cfline()
  instead since this is needed for a future change.
- In parse_action(), free the linked list returned by getaddrinfo().
- Remove some checks at the beginning of close_filed().  For some log
  types we'll always have f->f_file == -1, in which case we wouldn't
  release other resources, such as forwarding sockets.
- After converting a filed to an nvlist, free the filed resources.

Fixes:	2567168dc4 ("syslogd: Refresh configuration using libcasper")
Reviewed by:	jfree
Differential Revision:	https://reviews.freebsd.org/D48250
2025-01-03 01:51:19 +00:00
..
tests syslogd tests: Permit starting syslogd with multiple -b options 2025-01-03 01:50:59 +00:00
ftp.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
lpr.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile syslogd: Log messages using libcasper 2024-11-27 16:25:17 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pathnames.h usr.sbin: Remove ancient SCCS tags. 2023-11-26 22:23:56 -07:00
ppp.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
syslog.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
syslog.conf.5 usr.sbin: Remove ancient SCCS tags. 2023-11-26 22:23:56 -07:00
syslogd.8 syslogd: Add rfc3164-strict format option 2024-12-23 15:46:14 +00:00
syslogd.c syslogd: Fix resource leaks 2025-01-03 01:51:19 +00:00
syslogd.h syslogd: Open forwarding socket descriptors 2024-11-27 16:26:04 -06:00
syslogd_cap.c syslogd: Log messages using libcasper 2024-11-27 16:25:17 -06:00
syslogd_cap.h syslogd: Enter capability mode 2024-11-27 16:25:57 -06:00
syslogd_cap_config.c syslogd: Open forwarding socket descriptors 2024-11-27 16:26:04 -06:00
syslogd_cap_log.c syslogd: Log messages using libcasper 2024-11-27 16:25:17 -06:00