Extract pointer value for mnt_stat from vp after the NULL check, not

before.

Coverity ID:	134394
Found with:	Coverity Prevent (tm)
This commit is contained in:
Robert Watson 2006-06-06 08:43:27 +00:00
parent 27e216594b
commit a7cbec4448
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159332

View File

@ -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);
/*