diff options
author | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
commit | 8d91e07ef22ad3ed484b04bc4968380a24940696 (patch) | |
tree | b5b8989f8da9ef7f852081f0460995386edd4b5d /source/passdb/passdb.c | |
parent | 1a878c865637feb80206c0dc599acebf7f4a46bd (diff) | |
download | samba-3.0.10.tar.gz samba-3.0.10.tar.xz samba-3.0.10.zip |
r4231: commiting changes to 3.0.10samba-3.0.10
Diffstat (limited to 'source/passdb/passdb.c')
-rw-r--r-- | source/passdb/passdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 743978919b6..698b166e517 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -133,7 +133,7 @@ NTSTATUS pdb_init_sam_talloc(TALLOC_CTX *mem_ctx, SAM_ACCOUNT **user) return NT_STATUS_UNSUCCESSFUL; } - *user=(SAM_ACCOUNT *)talloc(mem_ctx, sizeof(SAM_ACCOUNT)); + *user=TALLOC_P(mem_ctx, SAM_ACCOUNT); if (*user==NULL) { DEBUG(0,("pdb_init_sam_talloc: error while allocating memory\n")); @@ -1885,7 +1885,7 @@ BOOL init_sam_from_buffer_v2(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) /* Change from V1 is addition of password history field. */ account_policy_get(AP_PASSWORD_HISTORY, &pwHistLen); if (pwHistLen) { - char *pw_hist = malloc(pwHistLen * PW_HISTORY_ENTRY_LEN); + char *pw_hist = SMB_MALLOC(pwHistLen * PW_HISTORY_ENTRY_LEN); if (!pw_hist) { ret = False; goto done; @@ -2164,7 +2164,7 @@ uint32 init_buffer_from_sam_v2 (uint8 **buf, const SAM_ACCOUNT *sampass, BOOL si } /* malloc the space needed */ - if ( (*buf=(uint8*)malloc(len)) == NULL) { + if ( (*buf=(uint8*)SMB_MALLOC(len)) == NULL) { DEBUG(0,("init_buffer_from_sam_v2: Unable to malloc() memory for buffer!\n")); return (-1); } |