1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3: Make use of talloc_array in pdb_set_plaintext_passwd()

This commit is contained in:
Volker Lendecke 2009-12-14 18:39:19 +01:00 committed by Michael Adam
parent 7ba006430f
commit e7290255f5

View File

@ -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;
}