summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-09-20 02:08:44 +0200
committerMartin Schwenke <martins@samba.org>2014-09-20 08:29:31 +0200
commit277f0412e92d40a81ea3e31585fad8881e8c88ba (patch)
tree30f1223a0eab004ada996037d33645eda32e7620
parent0f9669eb9f141a9543becf090bd2c9a4a46e1d15 (diff)
downloadsamba-277f0412e92d40a81ea3e31585fad8881e8c88ba.tar.gz
samba-277f0412e92d40a81ea3e31585fad8881e8c88ba.tar.xz
samba-277f0412e92d40a81ea3e31585fad8881e8c88ba.zip
passdb: Use talloc_zero_array
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Sat Sep 20 08:29:31 CEST 2014 on sn-devel-104
-rw-r--r--source3/passdb/pdb_ldap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 7dccc03709..0458e56263 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -855,13 +855,12 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
pwHistLen = MIN(pwHistLen, MAX_PW_HISTORY_LEN);
- pwhist = talloc_array(ctx, uint8,
- pwHistLen * PW_HISTORY_ENTRY_LEN);
+ pwhist = talloc_zero_array(ctx, uint8,
+ pwHistLen * PW_HISTORY_ENTRY_LEN);
if (pwhist == NULL) {
DEBUG(0, ("init_sam_from_ldap: talloc failed!\n"));
goto fn_exit;
}
- memset(pwhist, '\0', pwHistLen * PW_HISTORY_ENTRY_LEN);
if (smbldap_get_single_attribute(
ldap_state->smbldap_state->ldap_struct,