From fe2e114457703e7492d085b9ddcaf67ba382c63c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Tue, 5 May 2009 18:50:48 +0200 Subject: [PATCH] s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_free on malloced memory. Guenther (cherry picked from commit 5b37df21f6af52d20ad3a25361b1d7faa51308d1) (cherry picked from commit 079c52a2c39ca2723402e7c6e2f8fd5825c2c40f) --- source3/passdb/pdb_ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index b706721e77d..02e9fedb4be 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1908,7 +1908,7 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, struc } entry = ldap_first_entry(ldap_state->smbldap_state->ldap_struct, result); - dn = smbldap_talloc_dn(NULL, ldap_state->smbldap_state->ldap_struct, entry); + dn = smbldap_talloc_dn(talloc_tos(), ldap_state->smbldap_state->ldap_struct, entry); if (!dn) { return NT_STATUS_UNSUCCESSFUL; } -- 2.11.4.GIT