Fix a vnode leak when giving a child jail a too-long path when

debug.disablefullpath=1.
This commit is contained in:
Jamie Gritton 2016-06-09 21:59:11 +00:00
parent d80f1dd1d7
commit 932a6e432d

View File

@ -1010,6 +1010,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/")
? strlen(mypr->pr_path) : 0) > MAXPATHLEN) {
error = ENAMETOOLONG;
vrele(root);
goto done_free;
}
}