diff options
author | bp <bp@FreeBSD.org> | 2000-06-29 01:19:12 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2000-06-29 01:19:12 +0000 |
commit | 579668ebe92fcc9fc9f444a713083a7b42f6a23f (patch) | |
tree | b3968c7e93706f2b4d1798658dd626d9123e86c5 /sys/isofs | |
parent | 6c6297b200fc4c9df8b5bd35fcd4a48fa764c5c5 (diff) | |
download | FreeBSD-src-579668ebe92fcc9fc9f444a713083a7b42f6a23f.zip FreeBSD-src-579668ebe92fcc9fc9f444a713083a7b42f6a23f.tar.gz |
Fix memory leakage on module unload.
Spotted by: fixed INVARIANTS code
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 10 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 2 | ||||
-rw-r--r-- | sys/isofs/cd9660/iso.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index a1dfd39..4c95977 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -79,6 +79,16 @@ cd9660_init(vfsp) return (0); } +int +cd9660_uninit(vfsp) + struct vfsconf *vfsp; +{ + + if (isohashtbl != NULL) + free(isohashtbl, M_ISOFSMNT); + return (0); +} + /* * Use the device/inum pair to find the incore inode, and return a pointer diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index a828540..2b21ba9 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -88,7 +88,7 @@ static struct vfsops cd9660_vfsops = { cd9660_checkexp, cd9660_vptofh, cd9660_init, - vfs_stduninit, + cd9660_uninit, vfs_stdextattrctl, }; VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); diff --git a/sys/isofs/cd9660/iso.h b/sys/isofs/cd9660/iso.h index f9a4abb..2da3d82 100644 --- a/sys/isofs/cd9660/iso.h +++ b/sys/isofs/cd9660/iso.h @@ -258,6 +258,7 @@ struct iso_mnt { int cd9660_vget_internal __P((struct mount *, ino_t, struct vnode **, int, struct iso_directory_record *)); int cd9660_init __P((struct vfsconf *)); +int cd9660_uninit __P((struct vfsconf *)); #define cd9660_sysctl ((int (*) __P((int *, u_int, void *, size_t *, void *, \ size_t, struct proc *)))eopnotsupp) |