diff options
author | bp <bp@FreeBSD.org> | 2000-06-29 01:12:47 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2000-06-29 01:12:47 +0000 |
commit | 6c6297b200fc4c9df8b5bd35fcd4a48fa764c5c5 (patch) | |
tree | 7d7268ca7e4212e4b11c336fff7e49a764bbaa0b /sys | |
parent | 6ffdd2b43196364e602daa6b79e5a7d855c85f1a (diff) | |
download | FreeBSD-src-6c6297b200fc4c9df8b5bd35fcd4a48fa764c5c5.zip FreeBSD-src-6c6297b200fc4c9df8b5bd35fcd4a48fa764c5c5.tar.gz |
Fix memory leakage on module unload.
Spotted by: fixed INVARIANTS code
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 10 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfsmount.h | 1 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 10 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/msdosfs/msdosfsmount.h | 1 |
6 files changed, 24 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index b7bf2cb..4e237bf 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -110,6 +110,16 @@ msdosfs_init(vfsp) return (0); } +int +msdosfs_uninit(vfsp) + struct vfsconf *vfsp; +{ + + if (dehashtbl) + free(dehashtbl, M_MSDOSFSMNT); + return (0); +} + static struct denode * msdosfs_hashget(dev, dirclust, diroff) dev_t dev; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 84d8b7c..33b5cd7 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -981,7 +981,7 @@ static struct vfsops msdosfs_vfsops = { msdosfs_checkexp, msdosfs_vptofh, msdosfs_init, - vfs_stduninit, + msdosfs_uninit, vfs_stdextattrctl, }; diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 59cc7c9..adcfad0 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -198,6 +198,7 @@ struct msdosfsmount { (1024 << ((pmp)->pm_BlkPerSec >> 2)) int msdosfs_init __P((struct vfsconf *vfsp)); +int msdosfs_uninit __P((struct vfsconf *vfsp)); int msdosfs_mountroot __P((void)); #endif /* _KERNEL */ diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index b7bf2cb..4e237bf 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -110,6 +110,16 @@ msdosfs_init(vfsp) return (0); } +int +msdosfs_uninit(vfsp) + struct vfsconf *vfsp; +{ + + if (dehashtbl) + free(dehashtbl, M_MSDOSFSMNT); + return (0); +} + static struct denode * msdosfs_hashget(dev, dirclust, diroff) dev_t dev; diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index 84d8b7c..33b5cd7 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -981,7 +981,7 @@ static struct vfsops msdosfs_vfsops = { msdosfs_checkexp, msdosfs_vptofh, msdosfs_init, - vfs_stduninit, + msdosfs_uninit, vfs_stdextattrctl, }; diff --git a/sys/msdosfs/msdosfsmount.h b/sys/msdosfs/msdosfsmount.h index 59cc7c9..adcfad0 100644 --- a/sys/msdosfs/msdosfsmount.h +++ b/sys/msdosfs/msdosfsmount.h @@ -198,6 +198,7 @@ struct msdosfsmount { (1024 << ((pmp)->pm_BlkPerSec >> 2)) int msdosfs_init __P((struct vfsconf *vfsp)); +int msdosfs_uninit __P((struct vfsconf *vfsp)); int msdosfs_mountroot __P((void)); #endif /* _KERNEL */ |