Author: trasz
Date: Fri Aug 9 08:40:31 2013
New Revision: 254135
URL: http://svnweb.freebsd.org/changeset/base/254135
Log:
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
Modified:
head/sys/kern/vfs_acl.c
Modified: head/sys/kern/vfs_acl.c
==============================================================================
--- head/sys/kern/vfs_acl.c Fri Aug 9 08:38:51 2013 (r254134)
+++ head/sys/kern/vfs_acl.c Fri Aug 9 08:40:31 2013 (r254135)
@@ -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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"