diff options
author | 2020-06-23 16:31:06 +0000 | |
---|---|---|
committer | 2020-06-23 16:31:06 +0000 | |
commit | fc852cf77776273d7026dacf69f5daddbdc95ca1 (patch) | |
tree | d7506ec80710966054d7ee68c342950f02752ecc /sys | |
parent | bump pbuild datasize limit to 8G to allow Firefox to build with Rust 1.44 (diff) | |
download | wireguard-openbsd-fc852cf77776273d7026dacf69f5daddbdc95ca1.tar.xz wireguard-openbsd-fc852cf77776273d7026dacf69f5daddbdc95ca1.zip |
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.c | 13 |
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) |