summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-06-23 16:31:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-06-23 16:31:07 +0000
commita7898946818a49226b371cc2c3a184debed534cb (patch)
tree50323b344b96aef2341c931c39e285748b1e0d2a /sys
parentc199afbc9f0c6b5a9856a5fc7ecb343479d7c6a6 (diff)
Revert previous. hashfree() just calls free() which handles NULL with
aplomb. 16 lines of 'C' can be so hard to grok at a glance. Prompted to look more closely at those 16 lines by mpi@.
Diffstat (limited to 'sys')
-rw-r--r--sys/isofs/udf/udf_vfsops.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index 7e2bd89e643..2ba23e9686e 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.68 2020/06/23 13:40:19 krw Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.69 2020/06/23 16:31:06 krw Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -430,13 +430,12 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, uint32_t lb, struct proc *p)
return (0);
bail:
- if (ump->um_hashtbl != NULL)
+ if (ump != NULL) {
hashfree(ump->um_hashtbl, UDF_HASHTBLSIZE, M_UDFMOUNT);
-
- free(ump, M_UDFMOUNT, sizeof(*ump));
- mp->mnt_data = NULL;
- mp->mnt_flag &= ~MNT_LOCAL;
-
+ free(ump, M_UDFMOUNT, 0);
+ mp->mnt_data = NULL;
+ mp->mnt_flag &= ~MNT_LOCAL;
+ }
if (devvp->v_specinfo)
devvp->v_specmountpoint = NULL;
if (bp != NULL)