From: tedu Date: Fri, 12 Dec 2014 22:58:48 +0000 (+0000) Subject: free correct size. it's variable! X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=62089f9d279703b595e08ab881f173f3793d4069;p=openbsd free correct size. it's variable! --- diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index ca8facc2d7f..d5401a586ad 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.145 2014/12/12 19:02:07 tedu Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.146 2014/12/12 22:58:48 tedu Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -905,7 +905,7 @@ out: VOP_UNLOCK(devvp, 0, p); if (ump) { - free(ump->um_fs, M_UFSMNT, sizeof(*ump->um_fs)); + free(ump->um_fs, M_UFSMNT, ump->um_fs->fs_sbsize); free(ump, M_UFSMNT, sizeof(*ump)); mp->mnt_data = NULL; } @@ -1025,7 +1025,7 @@ 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, sizeof(*fs)); + free(fs, M_UFSMNT, fs->fs_sbsize); free(ump, M_UFSMNT, sizeof(*ump)); mp->mnt_data = (qaddr_t)0; mp->mnt_flag &= ~MNT_LOCAL;