diff options
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r-- | sys/nfs/nfs_serv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 0472ab8adfe..73de3b3590c 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.91 2010/09/09 10:37:04 thib Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.92 2012/03/21 16:33:21 kettenis Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -897,7 +897,7 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, nfsm_reply(NFSX_WCCDATA(info.nmi_v3)); nfsm_srvwcc(nfsd, dirfor_ret, &dirfor, diraft_ret, &diraft, &info); - if (info.nmi_v3) + if (dirp) vrele(dirp); return (0); } @@ -1134,7 +1134,8 @@ nfsrv_mknod(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, nfsm_reply(NFSX_WCCDATA(1)); nfsm_srvwcc(nfsd, dirfor_ret, &dirfor, diraft_ret, &diraft, &info); - vrele(dirp); + if (dirp) + vrele(dirp); return (0); } @@ -1387,7 +1388,7 @@ nfsrv_rename(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, &info); nfsm_srvwcc(nfsd, tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft, &info); - if (info.nmi_v3) + if (fdirp) vrele(fdirp); return (0); } @@ -1811,7 +1812,7 @@ nfsrv_mkdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, nfsm_reply(NFSX_WCCDATA(info.nmi_v3)); nfsm_srvwcc(nfsd, dirfor_ret, &dirfor, diraft_ret, &diraft, &info); - if (info.nmi_v3) + if (dirp) vrele(dirp); return (0); } @@ -1928,7 +1929,7 @@ nfsrv_rmdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, nfsm_reply(NFSX_WCCDATA(info.nmi_v3)); nfsm_srvwcc(nfsd, dirfor_ret, &dirfor, diraft_ret, &diraft, &info); - if (info.nmi_v3) + if (dirp) vrele(dirp); return (0); } |