diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-11-28 11:44:58 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-11-28 14:06:26 +0100 |
commit | bc6bceec655f241f23d713edc0d7a2633b5d6592 (patch) | |
tree | d138182aac8fe807589dffdca8c596aadbcf8003 /source3 | |
parent | 0f630abb3f197a8b672c6aa96362d83fdad1f92f (diff) | |
download | samba-bc6bceec655f241f23d713edc0d7a2633b5d6592.tar.gz samba-bc6bceec655f241f23d713edc0d7a2633b5d6592.tar.bz2 samba-bc6bceec655f241f23d713edc0d7a2633b5d6592.zip |
s3:vfs_gpfs: add no memory check in gpfs2smb_acl()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_gpfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b3ed3da5cf..e2058e1832 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -575,6 +575,11 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl, TALLOC_CTX *mem_ctx) result->count = pacl->acl_nace; result->acl = talloc_realloc(result, result->acl, struct smb_acl_entry, result->count); + if (result->acl == NULL) { + TALLOC_FREE(result); + errno = ENOMEM; + return NULL; + } for (i=0; i<pacl->acl_nace; i++) { struct smb_acl_entry *ace = &result->acl[i]; |