From bc6bceec655f241f23d713edc0d7a2633b5d6592 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 28 Nov 2012 11:44:58 +0100 Subject: s3:vfs_gpfs: add no memory check in gpfs2smb_acl() Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104 --- source3/modules/vfs_gpfs.c | 5 +++++ 1 file changed, 5 insertions(+) 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; iacl_nace; i++) { struct smb_acl_entry *ace = &result->acl[i]; -- cgit