summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-07-25 19:51:24 +0000
committermiod <miod@openbsd.org>2011-07-25 19:51:24 +0000
commitbf6e0fd4af7fbe0fb06ba6d10cbf38d5af30ab5a (patch)
treea5194173c816b5b985c7e731d2d850ab996a7774
parentsys_wait4 properly returns int. ok deraadt (diff)
downloadwireguard-openbsd-bf6e0fd4af7fbe0fb06ba6d10cbf38d5af30ab5a.tar.xz
wireguard-openbsd-bf6e0fd4af7fbe0fb06ba6d10cbf38d5af30ab5a.zip
Make sure vfsp is not used uninitialized in the mount -o update case;
ok krw@ matthew@
-rw-r--r--sys/kern/vfs_syscalls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index a2b46d8b872..bab1d742d6e 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.177 2011/07/18 00:16:54 matthew Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.178 2011/07/25 19:51:24 miod Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -146,6 +146,7 @@ sys_mount(struct proc *p, void *v, register_t *retval)
return (EINVAL);
}
mp = vp->v_mount;
+ vfsp = mp->mnt_vfc;
mntflag = mp->mnt_flag;
/*
* We only allow the filesystem to be reloaded if it