summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-29 00:52:17 +0200
committerGünther Deschner <gd@samba.org>2010-04-29 12:05:42 +0200
commitf5ac746091db768572d10997de05aa5f7e01d805 (patch)
tree9e97cac59a618a199a21046306445c03ea22d780
parent7e678ef0cf22fa450ec6af16992d8992c5a13728 (diff)
downloadsamba-f5ac746091db768572d10997de05aa5f7e01d805.tar.gz
samba-f5ac746091db768572d10997de05aa5f7e01d805.tar.bz2
samba-f5ac746091db768572d10997de05aa5f7e01d805.zip
s3-pdb_ldap: fix memleak.
Guenther
-rw-r--r--source3/passdb/pdb_ldap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 4ff718ebdb..a66ae9791a 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -3995,14 +3995,14 @@ static NTSTATUS ldapsam_get_account_policy_from_ldap(struct pdb_methods *methods
attrs[0] = policy_attr;
attrs[1] = NULL;
- filter = talloc_asprintf(NULL, "(objectClass=%s)", LDAP_OBJ_DOMINFO);
+ filter = talloc_asprintf(talloc_tos(), "(objectClass=%s)", LDAP_OBJ_DOMINFO);
if (filter == NULL) {
return NT_STATUS_NO_MEMORY;
}
rc = smbldap_search(ldap_state->smbldap_state, ldap_state->domain_dn,
LDAP_SCOPE_BASE, filter, attrs, 0,
&result);
-
+ TALLOC_FREE(filter);
if (rc != LDAP_SUCCESS) {
return ntstatus;
}