summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-14 18:39:19 +0100
committerMichael Adam <obnox@samba.org>2010-01-07 11:07:53 +0100
commite7290255f5ba1dd913bb3d40e71654cff1cfe4cf (patch)
treeeb88c7370906e5c8a013c20c98984715170681a3
parent7ba006430f427a1f28300d29a5c045a552d2382c (diff)
downloadsamba-e7290255f5ba1dd913bb3d40e71654cff1cfe4cf.tar.gz
samba-e7290255f5ba1dd913bb3d40e71654cff1cfe4cf.tar.bz2
samba-e7290255f5ba1dd913bb3d40e71654cff1cfe4cf.zip
s3: Make use of talloc_array in pdb_set_plaintext_passwd()
-rw-r--r--source3/passdb/pdb_get_set.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index af99e8110c..bea4c3278e 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -1051,8 +1051,9 @@ bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext)
/*
* Ensure we have space for the needed history.
*/
- uchar *new_history = (uchar *)TALLOC(
- sampass, pwHistLen*PW_HISTORY_ENTRY_LEN);
+ uchar *new_history = talloc_array(
+ sampass, uchar,
+ pwHistLen*PW_HISTORY_ENTRY_LEN);
if (!new_history) {
return False;
}