Do not ignore error from tmpfs_alloc_vp(). It results in access to

the random memory.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2014-07-16 14:08:01 +00:00
parent de75292a5b
commit 22bdc15a57

View File

@ -185,7 +185,9 @@ tmpfs_lookup(struct vop_cachedlookup_args *v)
cnp->cn_flags |= SAVENAME;
} else {
error = tmpfs_alloc_vp(dvp->v_mount, tnode,
cnp->cn_lkflags, vpp);
cnp->cn_lkflags, vpp);
if (error != 0)
goto out;
}
}
}