s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_fr...
authorGünther Deschner <gd@samba.org>
Tue, 5 May 2009 16:50:48 +0000 (18:50 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 5 May 2009 19:14:53 +0000 (21:14 +0200)
Guenther

source3/passdb/pdb_ldap.c

index d548fe9ee9382b2737822f4f37a19f96f5995deb..2ea6c44665951c396b1eb27bdbd3cdb9b640c37d 100644 (file)
@@ -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;
        }