mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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
This commit is contained in:
parent
0f630abb3f
commit
bc6bceec65
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user