svn commit: r332813 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Fri Apr 20 11:38:30 UTC 2018
Author: rmacklem
Date: Fri Apr 20 11:38:29 2018
New Revision: 332813
URL: https://svnweb.freebsd.org/changeset/base/332813
Log:
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.
MFC after: 1 week
Modified:
head/sys/fs/nfsclient/nfs_clport.c
Modified: head/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clport.c Fri Apr 20 09:57:31 2018 (r332812)
+++ head/sys/fs/nfsclient/nfs_clport.c Fri Apr 20 11:38:29 2018 (r332813)
@@ -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-head
mailing list