]> granicus.if.org Git - procps-ng/commit
library: respond to coverity (reluctantly), <PIDS> api
authorJim Warner <james.warner@comcast.net>
Mon, 16 May 2016 19:14:14 +0000 (14:14 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 17 May 2016 11:13:34 +0000 (21:13 +1000)
commit0511ab02451a9dd8a676aa11bbd1dabc117e5a7c
tree0cd4125cfacc85a2046de6fd7cf6f110a906c7bd
parent0580a7b4c67d0297629d37281b4f690894429626
library: respond to coverity (reluctantly), <PIDS> api

Calls to free() have now been reintroduce in the new()
function to quiet coverity warnings. Those free's were
removed originally as that library 'new' was returning
with a fatal error and a caller should end abnormally.

Plus, it is virtually impossible to fail a malloc call
under linux. And lastly, they required braces with the
if statement making the code considerably less pretty.

[ commit also includes 2 unrelated whitespace tweaks ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/pids.c