History log of /freebsd-10-stable/bin/ps/ps.c
Revision Date Author Comments
# 301148 01-Jun-2016 truckman

MFC r300648

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


# 266279 17-May-2014 bdrewery

MFC r265229,r265239:

Add -J to filter by matching jail IDs and names.


# 266279 17-May-2014 bdrewery

MFC r265229,r265239:

Add -J to filter by matching jail IDs and names.