svn commit: r281913 - stable/9/sys/fs/nfsclient

Pedro F. Giffuni pfg at FreeBSD.org
Fri Apr 24 02:15:15 UTC 2015


Author: pfg
Date: Fri Apr 24 02:15:14 2015
New Revision: 281913
URL: https://svnweb.freebsd.org/changeset/base/281913

Log:
  MFC	r281756:
  nfsrpc_createv4: fix double free.
  
  Reported by:	Oliver Pinter, clang static checker
  Obtained from:	HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707)
  Reviewed by:	rmacklem

Modified:
  stable/9/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 24 02:14:01 2015	(r281912)
+++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 24 02:15:14 2015	(r281913)
@@ -2027,8 +2027,10 @@ nfsrpc_createv4(vnode_t dvp, char *name,
 			    (void) nfs_catnap(PZERO, ret, "nfs_crt2");
 		    } while (ret == NFSERR_DELAY);
 		    if (ret) {
-			if (dp != NULL)
+			if (dp != NULL) {
 				FREE((caddr_t)dp, M_NFSCLDELEG);
+				dp = NULL;
+			}
 			if (ret == NFSERR_STALECLIENTID ||
 			    ret == NFSERR_STALEDONTRECOVER)
 				error = ret;


More information about the svn-src-stable-9 mailing list