svn commit: r255846 - stable/9/sys/kern

Edward Tomasz Napierala trasz at FreeBSD.org
Tue Sep 24 12:48:03 UTC 2013


Author: trasz
Date: Tue Sep 24 12:48:02 2013
New Revision: 255846
URL: http://svnweb.freebsd.org/changeset/base/255846

Log:
  MFC r254135:
  
  Don't dereference null pointer should acl_alloc() be passed M_NOWAIT
  and allocation failed.  Nothing in the tree passed M_NOWAIT.

Modified:
  stable/9/sys/kern/vfs_acl.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/vfs_acl.c
==============================================================================
--- stable/9/sys/kern/vfs_acl.c	Tue Sep 24 12:26:43 2013	(r255845)
+++ stable/9/sys/kern/vfs_acl.c	Tue Sep 24 12:48:02 2013	(r255846)
@@ -564,6 +564,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);


More information about the svn-src-stable-9 mailing list