summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-01-17 15:46:11 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-01-17 15:46:11 +0000
commitf6380ae8535f8fe7b1ca27fd77a1d8b85ad62064 (patch)
tree8c50ead9a297ca3ed375ca8f146a5b014f6e2877
parent8bb03a578802659f226c24adfd2935a8dadc515b (diff)
downloadsrc-test2-f6380ae8535f8fe7b1ca27fd77a1d8b85ad62064.tar.gz
src-test2-f6380ae8535f8fe7b1ca27fd77a1d8b85ad62064.zip
Notes
-rw-r--r--sys/kern/vfs_syscalls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index c7b0c71f9214..aeaa837c1a0a 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -678,6 +678,8 @@ fstatfs(p, uap)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
mp = ((struct vnode *)fp->f_data)->v_mount;
+ if (mp == NULL)
+ return (EBADF);
sp = &mp->mnt_stat;
error = VFS_STATFS(mp, sp, p);
if (error)