svn commit: r363688 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Thu Jul 30 07:11:09 UTC 2020
Author: mjg
Date: Thu Jul 30 07:11:08 2020
New Revision: 363688
URL: https://svnweb.freebsd.org/changeset/base/363688
Log:
vfs: make sure startdir_used is always assigned to before use
CID: 1431070
Modified:
head/sys/kern/vfs_lookup.c
Modified: head/sys/kern/vfs_lookup.c
==============================================================================
--- head/sys/kern/vfs_lookup.c Thu Jul 30 04:05:59 2020 (r363687)
+++ head/sys/kern/vfs_lookup.c Thu Jul 30 07:11:08 2020 (r363688)
@@ -289,11 +289,13 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp,
struct pwd *pwd;
cap_rights_t rights;
struct filecaps dirfd_caps;
- int error, startdir_used;
+ int error;
+ bool startdir_used;
cnp = &ndp->ni_cnd;
td = cnp->cn_thread;
+ startdir_used = false;
*pwdp = NULL;
#ifdef CAPABILITY_MODE
@@ -340,7 +342,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp,
} else {
if (ndp->ni_startdir != NULL) {
*dpp = ndp->ni_startdir;
- startdir_used = 1;
+ startdir_used = true;
} else if (ndp->ni_dirfd == AT_FDCWD) {
*dpp = pwd->pwd_cdir;
vrefact(*dpp);
More information about the svn-src-head
mailing list