summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/isofs/udf/udf_vfsops.c9
-rw-r--r--sys/ntfs/ntfs_ihash.c4
2 files changed, 5 insertions, 8 deletions
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index d7ecaf4d8d9..ef343803aee 100644
--- a/sys/isofs/udf/udf_vfsops.c
+++ b/sys/isofs/udf/udf_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udf_vfsops.c,v 1.56 2016/09/15 02:00:18 dlg Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.57 2016/09/24 18:38:23 tedu Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -430,8 +430,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, uint32_t lb, struct proc *p)
return (0);
bail:
- if (ump->um_hashtbl != NULL)
- free(ump->um_hashtbl, M_UDFMOUNT, 0);
+ hashfree(ump->um_hashtbl, UDF_HASHTBLSIZE, M_UDFMOUNT);
if (ump != NULL) {
free(ump, M_UDFMOUNT, 0);
@@ -480,9 +479,7 @@ udf_unmount(struct mount *mp, int mntflags, struct proc *p)
if (ump->um_stbl != NULL)
free(ump->um_stbl, M_UDFMOUNT, 0);
- if (ump->um_hashtbl != NULL)
- free(ump->um_hashtbl, M_UDFMOUNT, 0);
-
+ hashfree(ump->um_hashtbl, UDF_HASHTBLSIZE, M_UDFMOUNT);
free(ump, M_UDFMOUNT, 0);
mp->mnt_data = NULL;
diff --git a/sys/ntfs/ntfs_ihash.c b/sys/ntfs/ntfs_ihash.c
index e8ed6ac2bc0..28f9b3138d6 100644
--- a/sys/ntfs/ntfs_ihash.c
+++ b/sys/ntfs/ntfs_ihash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_ihash.c,v 1.19 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: ntfs_ihash.c,v 1.20 2016/09/24 18:38:23 tedu Exp $ */
/* $NetBSD: ntfs_ihash.c,v 1.1 2002/12/23 17:38:32 jdolecek Exp $ */
/*
@@ -70,7 +70,7 @@ ntfs_nthashinit(void)
nthashtbl = hashinit(initialvnodes, M_NTFSNTHASH, M_WAITOK, &nthash);
if (ntfs_nthashtbl) {
- free(nthashtbl, M_NTFSNTHASH, 0);
+ hashfree(nthashtbl, initialvnodes, M_NTFSNTHASH);
return;
}
ntfs_nthashtbl = nthashtbl;