freebsd-dev/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
convtbl.c
convtbl.h
devs.c
devs.h
extern.h
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
iostat.c
ip6.c
ip.c
keyboard.c
main.c
Makefile
Makefile.depend
mode.c
mode.h
netcmds.c
netstat.c
pigs.c
proc.c
sctp.c
swap.c
sysput.c
systat.1
systat.h
tcp.c
vmstat.c
zarc.c