diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-20 21:14:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:42 -0500 |
commit | b46913fb95d59f3ec8e7e71da758cd16cda05f2c (patch) | |
tree | d76c481d3fc054023e3ea37ae4858016bce5636c /source3/lib/util_smbd.c | |
parent | 84e0aafc78f9d91cde3a6b1c4a57d8ed3b6fd58c (diff) | |
download | samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.gz samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.tar.bz2 samba-b46913fb95d59f3ec8e7e71da758cd16cda05f2c.zip |
r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)
Diffstat (limited to 'source3/lib/util_smbd.c')
-rw-r--r-- | source3/lib/util_smbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_smbd.c b/source3/lib/util_smbd.c index fdb4cb3385..2eb0bb7cc0 100644 --- a/source3/lib/util_smbd.c +++ b/source3/lib/util_smbd.c @@ -45,7 +45,7 @@ BOOL getgroups_user(const char *user, gid_t primary_gid, gid_t **ret_groups, int int i; max_grp = groups_max(); - temp_groups = (gid_t *)malloc(sizeof(gid_t) * max_grp); + temp_groups = SMB_MALLOC_P(gid_t, max_grp); if (! temp_groups) { return False; } @@ -54,7 +54,7 @@ BOOL getgroups_user(const char *user, gid_t primary_gid, gid_t **ret_groups, int gid_t *groups_tmp; - groups_tmp = Realloc(temp_groups, sizeof(gid_t) * max_grp); + groups_tmp = SMB_REALLOC(temp_groups, gid_t, max_grp); if (!groups_tmp) { SAFE_FREE(temp_groups); |