aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2025-05-16 22:19:06 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2025-05-16 22:19:06 +0000
commit496b3c3a1ce86b72f56bec993b76bdd64723ee46 (patch)
tree5e39c0850e2462df9fac223c7035ced1cc5e8f72 /sys
parent95c414dd27c26285cdd6ed4288832b3db0ea6628 (diff)
Diffstat (limited to 'sys')
-rw-r--r--sys/security/mac_grantbylabel/mac_grantbylabel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/security/mac_grantbylabel/mac_grantbylabel.c b/sys/security/mac_grantbylabel/mac_grantbylabel.c
index af080e8e34e0..c40885773222 100644
--- a/sys/security/mac_grantbylabel/mac_grantbylabel.c
+++ b/sys/security/mac_grantbylabel/mac_grantbylabel.c
@@ -409,6 +409,10 @@ cleanup_file:
proc = pfind(gbl_args.u.pid);
if (proc == NULL)
return (EINVAL);
+ else if (proc->p_textvp == NULL) {
+ PROC_UNLOCK(proc);
+ return (EINVAL);
+ }
proc_locked = 1;
}
gbl_args.gbl = (SLOT(proc->p_textvp->v_label) |