Check vplabel for NULL before dereferencing it. Fixes a panic

when running atop with MAC_MLS enabled.

Submitted by:	Richard Kojedzinszky <krichy@tvnetwork.hu>
Reviewed by:	rwatson
MFC after:	1 week
This commit is contained in:
Christian Brueffer 2012-05-03 15:51:34 +00:00
parent 99fb123f8d
commit e623c22083
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234957
1 changed files with 3 additions and 0 deletions

View File

@ -2028,6 +2028,9 @@ mls_system_check_acct(struct ucred *cred, struct vnode *vp,
if (!mls_enabled)
return (0);
if (vplabel == NULL)
return (0);
subj = SLOT(cred->cr_label);
obj = SLOT(vplabel);