From: Günther Deschner Date: Tue, 5 May 2009 16:50:48 +0000 (+0200) Subject: s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_fr... X-Git-Tag: tdb-1.1.5~730 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b37df21f6af52d20ad3a25361b1d7faa51308d1;p=thirdparty%2Fsamba.git s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_free on malloced memory. Guenther --- diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index d548fe9ee93..2ea6c446659 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1909,7 +1909,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; }