svn commit: r333061 - stable/11/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Fri Apr 27 12:57:40 UTC 2018


Author: rmacklem
Date: Fri Apr 27 12:57:39 2018
New Revision: 333061
URL: https://svnweb.freebsd.org/changeset/base/333061

Log:
  MFC: r332813
  Fix use of pointer after being set NULL.
  
  Using a pointer after setting it NULL is probably not a good plan.
  Spotted by inspection during changes for Flexible File Layout Ioerr handling.
  This code path obviously isn't normally executed.

Modified:
  stable/11/sys/fs/nfsclient/nfs_clport.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clport.c	Fri Apr 27 12:50:17 2018	(r333060)
+++ stable/11/sys/fs/nfsclient/nfs_clport.c	Fri Apr 27 12:57:39 2018	(r333061)
@@ -1391,8 +1391,8 @@ nfssvc_nfscl(struct thread *td, struct nfssvc_args *ua
 						    NFSMNTP_CANCELRPCS);
 						mtx_unlock(&nmp->nm_mtx);
 					} else {
-						nmp = NULL;
 						mtx_unlock(&nmp->nm_mtx);
+						nmp = NULL;
 					}
 					break;
 				}


More information about the svn-src-all mailing list