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

s3-pdb_ldap: fix crash bug in ldapsam_set_trusteddom_pw().

Thanks Volker for the hint.

Guenther
This commit is contained in:
Günther Deschner 2009-10-20 18:35:16 +02:00
parent 205284c904
commit d168d7fe3c

View File

@ -6013,8 +6013,6 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
smbldap_make_mod(priv2ld(ldap_state), entry, &mods, smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
"sambaClearTextPassword", pwd); "sambaClearTextPassword", pwd);
talloc_autofree_ldapmod(talloc_tos(), mods);
if (entry != NULL) { if (entry != NULL) {
prev_pwd = smbldap_talloc_single_attribute(priv2ld(ldap_state), prev_pwd = smbldap_talloc_single_attribute(priv2ld(ldap_state),
entry, "sambaClearTextPassword", talloc_tos()); entry, "sambaClearTextPassword", talloc_tos());
@ -6025,6 +6023,8 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
} }
} }
talloc_autofree_ldapmod(talloc_tos(), mods);
trusted_dn = trusteddom_dn(ldap_state, domain); trusted_dn = trusteddom_dn(ldap_state, domain);
if (trusted_dn == NULL) { if (trusted_dn == NULL) {
return False; return False;