From b46913fb95d59f3ec8e7e71da758cd16cda05f2c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 20 Dec 2004 21:14:28 +0000 Subject: r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com). Jeremy (This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46) --- source3/lib/util_smbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_smbd.c') 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); -- cgit