svn commit: samba r4305 - in branches/SAMBA_3_0/source/lib: .
jra at samba.org
jra at samba.org
Tue Dec 21 04:34:17 GMT 2004
Author: jra
Date: 2004-12-21 04:34:14 +0000 (Tue, 21 Dec 2004)
New Revision: 4305
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4305
Log:
Fix from Albert Chin (china at thewrittenword.com) to fix the
earlier malloc changes.
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/sysacls.c
branches/SAMBA_3_0/source/lib/util_smbd.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/sysacls.c
===================================================================
--- branches/SAMBA_3_0/source/lib/sysacls.c 2004-12-21 04:34:07 UTC (rev 4304)
+++ branches/SAMBA_3_0/source/lib/sysacls.c 2004-12-21 04:34:14 UTC (rev 4305)
@@ -722,7 +722,7 @@
* 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 @@
* 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 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 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 @@
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;
}
Modified: branches/SAMBA_3_0/source/lib/util_smbd.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_smbd.c 2004-12-21 04:34:07 UTC (rev 4304)
+++ branches/SAMBA_3_0/source/lib/util_smbd.c 2004-12-21 04:34:14 UTC (rev 4305)
@@ -54,7 +54,7 @@
gid_t *groups_tmp;
- groups_tmp = SMB_REALLOC(temp_groups, gid_t, max_grp);
+ groups_tmp = SMB_REALLOC_ARRAY(temp_groups, gid_t, max_grp);
if (!groups_tmp) {
SAFE_FREE(temp_groups);
More information about the samba-cvs
mailing list