summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2016-04-12 16:53:42 +0000
committermillert <millert@openbsd.org>2016-04-12 16:53:42 +0000
commit614ccf87ac197caa7ecaafed1ec24ca4e0f9bfb5 (patch)
tree26a9e3660427463891cd43f22c1cabbabb2f3b56
parentSimplify amap traversal in amap_swap_off. (diff)
downloadwireguard-openbsd-614ccf87ac197caa7ecaafed1ec24ca4e0f9bfb5.tar.xz
wireguard-openbsd-614ccf87ac197caa7ecaafed1ec24ca4e0f9bfb5.zip
The -T flag consumes the same data as the -f flag so it requires
nlist too. Fixes a crash when the -T flag is specified due to calling kvm_read() with a NULL kvm_t. From Rob Pierce
-rw-r--r--usr.sbin/pstat/pstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 86aea58a7ce..28e322cfe4d 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.101 2015/12/11 11:53:52 tedu Exp $ */
+/* $OpenBSD: pstat.c,v 1.102 2016/04/12 16:53:42 millert Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -193,7 +193,7 @@ main(int argc, char *argv[])
need_nlist = vnodeflag || dformat;
if (nlistf != NULL || memf != NULL) {
- if (fileflag)
+ if (fileflag || totalflag)
need_nlist = 1;
}