Date: Tue, 24 Sep 2013 12:48:03 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255846 - stable/9/sys/kern Message-ID: <201309241248.r8OCm3R5074645@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309241248.r8OCm3R5074645>