Module Name: src
Committed By: mlelstv
Date: Wed Dec 25 11:15:49 UTC 2013
Modified Files:
src/sys/fs/sysvbfs: sysvbfs_vfsops.c
Log Message:
At least fetch mount data pointer before using it.
Coverity CID 274767
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/fs/sysvbfs/sysvbfs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/sysvbfs/sysvbfs_vfsops.c
diff -u src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.41 src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.42
--- src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.41 Thu Jun 14 01:08:22 2012
+++ src/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Dec 25 11:15:49 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $ */
+/* $NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -81,7 +81,7 @@ sysvbfs_mount(struct mount *mp, const ch
return EINVAL;
if (mp->mnt_flag & MNT_GETARGS) {
- if ((bmp = (void *)mp->mnt_data) == NULL)
+ if ((bmp = (struct sysvbfs_mount *)mp->mnt_data) == NULL)
return EIO;
args->fspec = NULL;
*data_len = sizeof *args;
@@ -116,6 +116,7 @@ sysvbfs_mount(struct mount *mp, const ch
* Be sure we're still naming the same device
* used for our initial mount
*/
+ bmp = (struct sysvbfs_mount *)mp->mnt_data;
if (devvp != bmp->devvp)
error = EINVAL;
}