]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Since p_cansee will end up dereferencing p_ucred, don't check for p_ucred
authorjmallett <jmallett@FreeBSD.org>
Tue, 17 Jan 2006 20:25:01 +0000 (20:25 +0000)
committerjmallett <jmallett@FreeBSD.org>
Tue, 17 Jan 2006 20:25:01 +0000 (20:25 +0000)
commite38f514d90d3e1da3bb1452eef8746bf5d24124b
tree33f048ae45da9a1f2e71073aaded7d50c3f35b66
parent396c4b8e2af1dbc3e74e528697bcfc18ac140ff4
Since p_cansee will end up dereferencing p_ucred, don't check for p_ucred
equal to NULL several times later.  p_ucred "should probably not" be NULL
if the process isn't PRS_NEW anyway.  This is strongly reinforced by the fact
that we don't see frequent crashes here.  Remove the checks after p_cansee and
add a KASSERT right before it.

Found by: Coverity Prevent (tm)

Also trim one nearby trailing space.
sys/kern/kern_proc.c