svn commit: r327114 - head/sys/kern
Alexander Kabaev
kan at FreeBSD.org
Sat Dec 23 17:55:20 UTC 2017
Author: kan
Date: Sat Dec 23 17:55:19 2017
New Revision: 327114
URL: https://svnweb.freebsd.org/changeset/base/327114
Log:
Reverse the check to allocate the buffer if cached pointer is NULL.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D13596
Modified:
head/sys/kern/vfs_export.c
Modified: head/sys/kern/vfs_export.c
==============================================================================
--- head/sys/kern/vfs_export.c Sat Dec 23 16:49:57 2017 (r327113)
+++ head/sys/kern/vfs_export.c Sat Dec 23 17:55:19 2017 (r327114)
@@ -412,7 +412,7 @@ vfs_setpublicfs(struct mount *mp, struct netexport *ne
* If an indexfile was specified, pull it in.
*/
if (argp->ex_indexfile != NULL) {
- if (nfs_pub.np_index != NULL)
+ if (nfs_pub.np_index == NULL)
nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP,
M_WAITOK);
error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
More information about the svn-src-all
mailing list