Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2018 12:57:39 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r333061 - stable/11/sys/fs/nfsclient
Message-ID:  <201804271257.w3RCvd30085594@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 				}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804271257.w3RCvd30085594>