Index: head/sys/kern/vfs_export.c =================================================================== --- head/sys/kern/vfs_export.c +++ head/sys/kern/vfs_export.c @@ -412,7 +412,7 @@ * 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,