diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-06-06 08:43:27 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-06-06 08:43:27 +0000 |
commit | abd4afc6be28a73083acf5c85a3108932f2dd7ab (patch) | |
tree | 25091c225bbea74a7335f4a0c68758888e29f3cc /sys | |
parent | 62e2a7bdfd7f6ad31b95ef4fefa3267dd4417f4d (diff) | |
download | FreeBSD-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.c | 3 |
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); /* |