summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-12-12 19:02:08 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-12-12 19:02:08 +0000
commit3bca6dc49b7cf68a3218d5d6f9a8ccf219d8ffa0 (patch)
treef713d65957174d2a12156689c1476e67a1a6b944 /sys/ufs/ffs
parentc87795163ff17965593f764d156a2f0e82266d32 (diff)
sizeof(*ptr) for some free()
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 87e3bce62e4..ca8facc2d7f 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.144 2014/11/18 02:37:31 tedu Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.145 2014/12/12 19:02:07 tedu Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -137,7 +137,7 @@ ffs_mountroot(void)
if ((error = ffs_mountfs(rootvp, mp, p)) != 0) {
mp->mnt_vfc->vfc_refcount--;
vfs_unbusy(mp);
- free(mp, M_MOUNT, 0);
+ free(mp, M_MOUNT, sizeof(*mp));
vrele(swapdev_vp);
vrele(rootvp);
return (error);
@@ -905,8 +905,8 @@ out:
VOP_UNLOCK(devvp, 0, p);
if (ump) {
- free(ump->um_fs, M_UFSMNT, 0);
- free(ump, M_UFSMNT, 0);
+ free(ump->um_fs, M_UFSMNT, sizeof(*ump->um_fs));
+ free(ump, M_UFSMNT, sizeof(*ump));
mp->mnt_data = NULL;
}
return (error);
@@ -1025,8 +1025,8 @@ ffs_unmount(struct mount *mp, int mntflags, struct proc *p)
NOCRED, p);
vput(ump->um_devvp);
free(fs->fs_csp, M_UFSMNT, 0);
- free(fs, M_UFSMNT, 0);
- free(ump, M_UFSMNT, 0);
+ free(fs, M_UFSMNT, sizeof(*fs));
+ free(ump, M_UFSMNT, sizeof(*ump));
mp->mnt_data = (qaddr_t)0;
mp->mnt_flag &= ~MNT_LOCAL;
return (error);