diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-21 04:34:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:43 -0500 |
commit | da7ef2517162740bc61a81ae814d48348aa513d5 (patch) | |
tree | cd3c07810c84a8989a5592b21f1f7c69be855265 /source/lib/sysacls.c | |
parent | 235a0c1698db48583a6860a3a9fca9f261544365 (diff) | |
download | samba-da7ef2517162740bc61a81ae814d48348aa513d5.tar.gz samba-da7ef2517162740bc61a81ae814d48348aa513d5.tar.xz samba-da7ef2517162740bc61a81ae814d48348aa513d5.zip |
r4305: Fix from Albert Chin (china@thewrittenword.com) to fix the
earlier malloc changes.
Jeremy.
Diffstat (limited to 'source/lib/sysacls.c')
-rw-r--r-- | source/lib/sysacls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/lib/sysacls.c b/source/lib/sysacls.c index f5801af8c55..4484810884d 100644 --- a/source/lib/sysacls.c +++ b/source/lib/sysacls.c @@ -722,7 +722,7 @@ SMB_ACL_T sys_acl_init(int count) * acl[] array, this actually allocates an ACL with room * for (count+1) entries */ - if ((a = SMB_MALLOC(sizeof(*a) + count * sizeof(struct acl))) == NULL) { + if ((a = SMB_MALLOC(sizeof(struct SMB_ACL_T) + count * sizeof(struct acl))) == NULL) { errno = ENOMEM; return NULL; } @@ -1353,7 +1353,7 @@ SMB_ACL_T sys_acl_init(int count) * acl[] array, this actually allocates an ACL with room * for (count+1) entries */ - if ((a = SMB_MALLOC(sizeof(*a) + count * sizeof(struct acl))) == NULL) { + if ((a = SMB_MALLOC(sizeof(struct SMB_ACL_T) + count * sizeof(struct acl))) == NULL) { errno = ENOMEM; return NULL; } @@ -1982,7 +1982,7 @@ SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type) { SMB_ACL_T a; - if ((a = SMB_MALLOC_P(SMB_ACL_T)) == NULL) { + if ((a = SMB_MALLOC_P(struct SMB_ACL_T)) == NULL) { errno = ENOMEM; return NULL; } @@ -1999,7 +1999,7 @@ SMB_ACL_T sys_acl_get_fd(int fd) { SMB_ACL_T a; - if ((a = SMB_MALLOC_P(SMB_ACL_T)) == NULL) { + if ((a = SMB_MALLOC_P(struct SMB_ACL_T)) == NULL) { errno = ENOMEM; return NULL; } @@ -2056,7 +2056,7 @@ SMB_ACL_T sys_acl_init(int count) return NULL; } - if ((a = SMB_MALLOC_P(struct acl)) == NULL) { + if ((a = SMB_MALLOC(sizeof(struct SMB_ACL_T) + sizeof(struct acl))) == NULL) { errno = ENOMEM; return NULL; } |