In ufs_dir_dd_ino(), always initialize *dd_vp since the caller expects it.

Reviewed by:	kib, mckusick
Approved by:	imp (mentor)
Sponsored by:	Netflix
This commit is contained in:
Chuck Silvers 2019-11-12 00:32:33 +00:00
parent c47c10a1f3
commit b0cf923749
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354632

View File

@ -1408,6 +1408,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino,
int error, namlen;
ASSERT_VOP_LOCKED(vp, "ufs_dir_dd_ino");
*dd_vp = NULL;
if (vp->v_type != VDIR)
return (ENOTDIR);
/*
@ -1440,7 +1441,6 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino,
dirbuf.dotdot_name[1] != '.')
return (ENOTDIR);
*dd_ino = dirbuf.dotdot_ino;
*dd_vp = NULL;
return (0);
}