-/* $OpenBSD: vfs_lookup.c,v 1.5 1996/11/06 06:51:45 tholo Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.6 1997/03/01 23:03:38 tholo Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
/*
* Check for directory if dironly
*/
- if (dironly && ndp->ni_vp->v_type != VDIR) {
+ if (dironly && ndp->ni_vp != NULL && ndp->ni_vp->v_type != VDIR) {
if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1)
VOP_UNLOCK(ndp->ni_dvp);
vput(ndp->ni_vp);