Author: avg Date: Thu Nov 16 22:14:49 2017 New Revision: 325906 URL: https://svnweb.freebsd.org/changeset/base/325906
Log: procstat: fix a crash with -k -a options The traditional / legacy usage should still be supported. This fixes a regression in r324619 that introduced a nicer, verb based interface. Reviewed by: brooks X-MFC with: r324619 Modified: head/usr.bin/procstat/procstat.c Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Thu Nov 16 21:47:41 2017 (r325905) +++ head/usr.bin/procstat/procstat.c Thu Nov 16 22:14:49 2017 (r325906) @@ -296,7 +296,7 @@ main(int argc, char *argv[]) cmd = getcmd("tsignals"); break; case 'k': - if (cmd->cmd == procstat_kstack) { + if (cmd != NULL && cmd->cmd == procstat_kstack) { if ((procstat_opts & PS_OPT_VERBOSE) != 0) usage(); procstat_opts |= PS_OPT_VERBOSE; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"