Fix mismerge in last commit: check that cred->cr_prison is NULL

before dereferencing the prison pointer.
This commit is contained in:
Robert Watson 2004-02-14 18:52:43 +00:00
parent f08df373a3
commit 7e440242e5

View File

@ -431,7 +431,7 @@ int
prison_check_mount(struct ucred *cred, struct mount *mp)
{
if (jail_getfsstatroot_only) {
if (jail_getfsstatroot_only && cred->cr_prison != NULL) {
if (cred->cr_prison->pr_root->v_mount != mp)
return (0);
}