diff options
| -rw-r--r-- | sys/security/mac_grantbylabel/mac_grantbylabel.c | 4 |
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) | |
