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

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);