Module Name:    src
Committed By:   bouyer
Date:           Sun Sep 30 17:59:57 UTC 2012

Modified Files:
        src/sys/nfs [netbsd-5]: nfs_serv.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #1794):
        sys/nfs/nfs_serv.c: revision 1.164 via patch
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.138.16.2 -r1.138.16.3 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.138.16.2 src/sys/nfs/nfs_serv.c:1.138.16.3
--- src/sys/nfs/nfs_serv.c:1.138.16.2	Sun Feb 14 13:27:45 2010
+++ src/sys/nfs/nfs_serv.c	Sun Sep 30 17:59:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_serv.c,v 1.138.16.2 2010/02/14 13:27:45 bouyer Exp $	*/
+/*	$NetBSD: nfs_serv.c,v 1.138.16.3 2012/09/30 17:59:57 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.138.16.2 2010/02/14 13:27:45 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.138.16.3 2012/09/30 17:59:57 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1866,6 +1866,7 @@ nfsrv_rename(nfsd, slp, lwp, mrq)
 		fdirfor_ret = VOP_GETATTR(fdirp, &fdirfor, cred);
 	}
 	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);

Reply via email to