diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 94395f8bc0a..44eff61a8a0 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.127 2018/06/06 06:55:22 mpi Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.128 2018/06/07 13:37:27 visa Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -456,6 +456,7 @@ unp_bind(struct unpcb *unp, struct mbuf *nam, struct proc *p) vattr.va_type = VSOCK; vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask; error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); + vput(nd.ni_dvp); if (error) { m_freem(nam2); return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 6d3878a1d0f..477da52ee9b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.286 2018/06/05 09:29:05 mpi Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.287 2018/06/07 13:37:27 visa Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -1337,6 +1337,7 @@ domknodat(struct proc *p, int fd, const char *path, mode_t mode, dev_t dev) out: if (!error) { error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); + vput(nd.ni_dvp); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == vp) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 948306ce7aa..03fe499734c 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.92 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.93 2018/06/07 13:37:27 visa Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -109,6 +109,7 @@ vn_open(struct nameidata *ndp, int fmode, int cmode) va.va_vaflags |= VA_EXCLUSIVE; error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, &va); + vput(ndp->ni_dvp); if (error) return (error); fmode &= ~O_TRUNC; |