summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2016-06-15 01:59:55 +0000
committerjamie <jamie@FreeBSD.org>2016-06-15 01:59:55 +0000
commit397ec06345fc47c5382e9039620c5bda239ef456 (patch)
treea41caf585a3b6050d46c3358319516f89a867663 /sys/kern
parentb19195f81214ebe5c4d846e7cab2c6e159a14458 (diff)
downloadFreeBSD-src-397ec06345fc47c5382e9039620c5bda239ef456.zip
FreeBSD-src-397ec06345fc47c5382e9039620c5bda239ef456.tar.gz
MFC r301764:
Fix a vnode leak when giving a child jail a too-long path when debug.disablefullpath=1.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_jail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 4f3633b..a0e4c61 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1022,6 +1022,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;
}
}
OpenPOWER on IntegriCloud