summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2016-06-01 17:33:02 +0000
committertruckman <truckman@FreeBSD.org>2016-06-01 17:33:02 +0000
commitefd2996ff9ab633d8be09fa755ee1b021937fede (patch)
treeadf034f071dd2c950f03231446f2c4dcb742f696 /lib/libfetch
parented265b2890fdcb1fa5b9bbdaddfd54fb5e3cf2ed (diff)
downloadFreeBSD-src-efd2996ff9ab633d8be09fa755ee1b021937fede.zip
FreeBSD-src-efd2996ff9ab633d8be09fa755ee1b021937fede.tar.gz
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
Diffstat (limited to 'lib/libfetch')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud