Module Name: src Committed By: chs Date: Mon Aug 27 11:35:14 UTC 2012
Modified Files: src/sys/nfs: nfs_serv.c Log Message: fix error handling in nfsrv_rename(): when the first nfs_namei() fails, don't try to free the resources allocated by a successful lookup. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/nfs/nfs_serv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/nfs/nfs_serv.c diff -u src/sys/nfs/nfs_serv.c:1.163 src/sys/nfs/nfs_serv.c:1.164 --- src/sys/nfs/nfs_serv.c:1.163 Wed Feb 1 02:27:24 2012 +++ src/sys/nfs/nfs_serv.c Mon Aug 27 11:35:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $ */ +/* $NetBSD: nfs_serv.c,v 1.164 2012/08/27 11:35:13 chs Exp $ */ /* * Copyright (c) 1989, 1993 @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.164 2012/08/27 11:35:13 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1931,6 +1931,7 @@ nfsrv_rename(struct nfsrv_descript *nfsd VOP_UNLOCK(fdirp); } if (error) { + fromnd.ni_cnd.cn_nameiop = 0; nfsm_reply(2 * NFSX_WCCDATA(v3)); nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft); nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft);