Author: chs
Date: Tue Nov 12 00:32:33 2019
New Revision: 354632
URL: https://svnweb.freebsd.org/changeset/base/354632
Log:
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
Modified:
head/sys/ufs/ufs/ufs_lookup.c
Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c Mon Nov 11 22:18:05 2019
(r354631)
+++ head/sys/ufs/ufs/ufs_lookup.c Tue Nov 12 00:32:33 2019
(r354632)
@@ -1408,6 +1408,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, i
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, i
dirbuf.dotdot_name[1] != '.')
return (ENOTDIR);
*dd_ino = dirbuf.dotdot_ino;
- *dd_vp = NULL;
return (0);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"