freebsd-skq/bin/ps
truckman 01033af8a1 Fix CID 1011370 (Resource leak) in ps.
There is no need to to call strdup() on the value returned by fmt().
The latter calls fmt_argv() which always returns a dynamically
allocated string, and calling strdup() on that leaks the memory
allocated by fmt_argv().  Wave some const magic on ki_args and
ki_env to make the direct assignment happy.  This requires a tweak
to the asprintf() case to avoid a const vs. non-const mismatch.

Reported by:	Coverity
CID:		1011370
MFC after:	1 week
2016-05-25 05:12:56 +00:00
..
extern.h Include the thread name along with the command name when displaying the 2013-01-18 18:24:40 +00:00
fmt.c - Move 'showthreads' check out of fmt.c. 2013-01-19 00:21:55 +00:00
keyword.c Convert to use libxo. Document use of libxo as well. 2015-05-22 23:07:55 +00:00
Makefile Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
Makefile.depend Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
nlist.c
print.c Convert to use libxo. Document use of libxo as well. 2015-05-22 23:07:55 +00:00
ps.1 Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
ps.c Fix CID 1011370 (Resource leak) in ps. 2016-05-25 05:12:56 +00:00
ps.h Fix CID 1011370 (Resource leak) in ps. 2016-05-25 05:12:56 +00:00