summaryrefslogtreecommitdiff
path: root/source4/torture/ldap
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-15 00:27:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:12 -0500
commitc0947b0d7f809f5139fbfcdbd618ed7b0a77d2be (patch)
tree7c0d7391b8f27d55e40b22f2c16315356e10a167 /source4/torture/ldap
parent74a3621089d4d1e9ba4c1a02e44247d1cff29200 (diff)
downloadsamba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.tar.gz
samba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.tar.bz2
samba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.zip
r7593: simplified the memory management in the ldap code. Having a mem_ctx
element in a structure is not necessary any more. (This used to be commit 912d0427f52eac811b27bf7e385b0642f7dc7f53)
Diffstat (limited to 'source4/torture/ldap')
-rw-r--r--source4/torture/ldap/basic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index 931a1ee2cc..97837d9ba8 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -97,7 +97,7 @@ static BOOL test_search_rootDSE(struct ldap_connection *conn, char **basedn)
msg->r.SearchRequest.timelimit = 0;
msg->r.SearchRequest.sizelimit = 0;
msg->r.SearchRequest.attributesonly = False;
- msg->r.SearchRequest.tree = ldb_parse_tree(msg->mem_ctx, "(objectclass=*)");
+ msg->r.SearchRequest.tree = ldb_parse_tree(msg, "(objectclass=*)");
msg->r.SearchRequest.num_attributes = 0;
msg->r.SearchRequest.attributes = NULL;
@@ -121,7 +121,7 @@ static BOOL test_search_rootDSE(struct ldap_connection *conn, char **basedn)
(char *)r->attributes[i].values[j].data));
if (!(*basedn) &&
strcasecmp("defaultNamingContext",r->attributes[i].name)==0) {
- *basedn = talloc_asprintf(conn->mem_ctx, "%.*s",
+ *basedn = talloc_asprintf(conn, "%.*s",
r->attributes[i].values[j].length,
(char *)r->attributes[i].values[j].data);
}
@@ -156,9 +156,9 @@ static BOOL test_compare_sasl(struct ldap_connection *conn, const char *basedn)
req->type = LDAP_TAG_CompareRequest;
req->r.CompareRequest.dn = basedn;
- req->r.CompareRequest.attribute = talloc_strdup(req->mem_ctx, "objectClass");
+ req->r.CompareRequest.attribute = talloc_strdup(req, "objectClass");
val = "domain";
- req->r.CompareRequest.value = data_blob_talloc(req->mem_ctx, val, strlen(val));
+ req->r.CompareRequest.value = data_blob_talloc(req, val, strlen(val));
rep = ldap_transaction(conn, req);
if (!rep) {