freebsd-nq/usr.bin/systat
John Baldwin f6fdf9214a systat: Fix a bunch of use after frees in fetch_ifstat().
I think this was probably just a typo.  initifstat() continues around
a similar loop if the mib data fails to fetch, and fetch_ifstat() was
already using a FOREACH_SAFE loop here so expected to keep going.
Calling clearifstat() from the fetch routine also seems wrong, and the
sort_interface_list() call triggered by the existing needsort = 1 will
itself set needclear to trigger a future clearifstat().

Reported by:	GCC 12 -Wuse-after-free
Differential Revision:	https://reviews.freebsd.org/D36823
2022-11-22 11:11:42 -08:00
..
cmds.c
cmdtab.c Report I/O stats from the CAM_IOSCHED_DYNAMIC extension 2022-02-28 10:44:47 -07:00
convtbl.c
convtbl.h
devs.c systat: mostly clean up warns 2021-11-01 23:11:16 +00:00
devs.h systat: Handle SIGWINCH to properly window resizing and adjust 2021-04-21 20:31:58 +02:00
extern.h Report I/O stats from the CAM_IOSCHED_DYNAMIC extension 2022-02-28 10:44:47 -07:00
fetch.c
icmp6.c
icmp.c
ifcmds.c
ifstat.c systat: Fix a bunch of use after frees in fetch_ifstat(). 2022-11-22 11:11:42 -08:00
iolat.c Report I/O stats from the CAM_IOSCHED_DYNAMIC extension 2022-02-28 10:44:47 -07:00
iostat.c systat/iostat: Use bools for numbers and kbpt 2022-02-07 14:51:45 -07:00
ip6.c
ip.c
keyboard.c
main.c Report I/O stats from the CAM_IOSCHED_DYNAMIC extension 2022-02-28 10:44:47 -07:00
Makefile Report I/O stats from the CAM_IOSCHED_DYNAMIC extension 2022-02-28 10:44:47 -07:00
Makefile.depend
mode.c
mode.h
netcmds.c
netstat.c systat: remove INP_TIMEWAIT 2022-10-06 19:24:37 -07:00
pigs.c systat: Avoid incorrect reallocation in pigs.c 2021-04-21 20:09:21 +02:00
proc.c systat: mostly clean up warns 2021-11-01 23:11:16 +00:00
sctp.c
swap.c Augment systat(1) -swap to display large swap space processes 2021-10-26 15:50:29 +03:00
sysput.c systat: Eliminate write-only unit variable 2022-02-07 14:51:45 -07:00
systat.1 systat.1: Fix lists 2022-04-02 00:49:53 +02:00
systat.h Augment systat(1) -swap to display large swap space processes 2021-10-26 15:50:29 +03:00
tcp.c Tcp progress timeout 2022-09-27 13:38:20 -04:00
vmstat.c systat: Display seconds in vmstat mode 2022-01-29 20:41:19 +11:00
zarc.c Clean up copyright messages. 2021-05-10 23:14:35 -07:00