summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2000-06-29 01:19:12 +0000
committerbp <bp@FreeBSD.org>2000-06-29 01:19:12 +0000
commit579668ebe92fcc9fc9f444a713083a7b42f6a23f (patch)
treeb3968c7e93706f2b4d1798658dd626d9123e86c5
parent6c6297b200fc4c9df8b5bd35fcd4a48fa764c5c5 (diff)
downloadFreeBSD-src-579668ebe92fcc9fc9f444a713083a7b42f6a23f.zip
FreeBSD-src-579668ebe92fcc9fc9f444a713083a7b42f6a23f.tar.gz
Fix memory leakage on module unload.
Spotted by: fixed INVARIANTS code
-rw-r--r--sys/fs/cd9660/cd9660_node.c10
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c2
-rw-r--r--sys/fs/cd9660/iso.h1
-rw-r--r--sys/isofs/cd9660/cd9660_node.c10
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c2
-rw-r--r--sys/isofs/cd9660/iso.h1
6 files changed, 24 insertions, 2 deletions
diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c
index a1dfd39..4c95977 100644
--- a/sys/fs/cd9660/cd9660_node.c
+++ b/sys/fs/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/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index a828540..2b21ba9 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/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/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h
index f9a4abb..2da3d82 100644
--- a/sys/fs/cd9660/iso.h
+++ b/sys/fs/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)
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)
OpenPOWER on IntegriCloud