summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-06-06 08:43:27 +0000
committerrwatson <rwatson@FreeBSD.org>2006-06-06 08:43:27 +0000
commitabd4afc6be28a73083acf5c85a3108932f2dd7ab (patch)
tree25091c225bbea74a7335f4a0c68758888e29f3cc /sys
parent62e2a7bdfd7f6ad31b95ef4fefa3267dd4417f4d (diff)
downloadFreeBSD-src-abd4afc6be28a73083acf5c85a3108932f2dd7ab.zip
FreeBSD-src-abd4afc6be28a73083acf5c85a3108932f2dd7ab.tar.gz
Extract pointer value for mnt_stat from vp after the NULL check, not
before. Coverity ID: 134394 Found with: Coverity Prevent (tm)
Diffstat (limited to 'sys')
-rw-r--r--sys/security/audit/audit_worker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c
index fa6485f..d4cef64 100644
--- a/sys/security/audit/audit_worker.c
+++ b/sys/security/audit/audit_worker.c
@@ -115,12 +115,13 @@ audit_record_write(struct vnode *vp, struct ucred *cred, struct thread *td,
int ret;
long temp;
struct vattr vattr;
- struct statfs *mnt_stat = &vp->v_mount->mnt_stat;
+ struct statfs *mnt_stat;
int vfslocked;
if (vp == NULL)
return (0);
+ mnt_stat = &vp->v_mount->mnt_stat;
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
/*
OpenPOWER on IntegriCloud