diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index dec6967937cb..ba7e13b5d1a8 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -833,8 +833,10 @@ unp_bind(struct unpcb *unp, struct sockaddr *nam, struct thread *td) } NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); - if (error) + if (error) { + vn_finished_write(mp); goto done; + } vp = nd.ni_vp; ASSERT_VOP_LOCKED(vp, "unp_bind"); soun = (struct sockaddr_un *)sodupsockaddr(nam, M_WAITOK);