svn commit: r273351 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Mon Oct 20 22:52:16 UTC 2014
Author: mjg
Date: Mon Oct 20 22:52:15 2014
New Revision: 273351
URL: https://svnweb.freebsd.org/changeset/base/273351
Log:
Plug unnecessary binvp NULL initialization and test.
Reported by: Coverity
CID: 1018889
Modified:
head/sys/kern/kern_exec.c
Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c Mon Oct 20 22:22:39 2014 (r273350)
+++ head/sys/kern/kern_exec.c Mon Oct 20 22:52:15 2014 (r273351)
@@ -348,7 +348,7 @@ do_execve(td, args, mac_p)
struct vnode *tracevp = NULL;
struct ucred *tracecred = NULL;
#endif
- struct vnode *textvp = NULL, *binvp = NULL;
+ struct vnode *textvp = NULL, *binvp;
cap_rights_t rights;
int credential_changing;
int textset;
@@ -422,7 +422,7 @@ interpret:
if (error)
goto exec_fail;
- binvp = nd.ni_vp;
+ binvp = nd.ni_vp;
imgp->vp = binvp;
} else {
AUDIT_ARG_FD(args->fd);
@@ -839,7 +839,7 @@ done1:
*/
if (textvp != NULL)
vrele(textvp);
- if (binvp && error != 0)
+ if (error != 0)
vrele(binvp);
#ifdef KTRACE
if (tracevp != NULL)
More information about the svn-src-all
mailing list