Don't dereference null pointer should acl_alloc() be passed M_NOWAIT

and allocation failed.  Nothing in the tree passed M_NOWAIT.

Obtained from:	mjg
MFC after:	1 month
This commit is contained in:
Edward Tomasz Napierala 2013-08-09 08:40:31 +00:00
parent cc55ad3d72
commit 8ddc3590cc

View File

@ -540,6 +540,9 @@ acl_alloc(int flags)
struct acl *aclp;
aclp = malloc(sizeof(*aclp), M_ACL, flags);
if (aclp == NULL)
return (NULL);
aclp->acl_maxcnt = ACL_MAX_ENTRIES;
return (aclp);