summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-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;
}