summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-09-08 14:32:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:59 -0500
commita865dcf02fa5e523492ba194dc6a941c2e70847a (patch)
treebeca0acd4b6a3cfa88011ecd441411d4159d5f25 /source4/lib/ldb/common/ldb.c
parent7caf7839f5243546437e75f0f7eec52bcea98d6b (diff)
downloadsamba-a865dcf02fa5e523492ba194dc6a941c2e70847a.tar.gz
samba-a865dcf02fa5e523492ba194dc6a941c2e70847a.tar.bz2
samba-a865dcf02fa5e523492ba194dc6a941c2e70847a.zip
r18272: Couldn't resist to change this.
What we want to do here is to just make sure res is freed. Well let's just do so explicitly, the steal cofused me initially while reading the code. This way it is clear what we want to do. Simo. (This used to be commit 30a26a501fef939991a2e998003c5a43fd5cb67e)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 5aa243ac7a..991a810135 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -163,11 +163,11 @@ static const struct ldb_dn *ldb_set_default_basedn(struct ldb_context *ldb)
ret = ldb_search(ldb, ldb_dn_new(tmp_ctx), LDB_SCOPE_BASE,
"(objectClass=*)", attrs, &res);
if (ret == LDB_SUCCESS) {
- talloc_steal(tmp_ctx, res);
if (res->count == 1) {
basedn = ldb_msg_find_attr_as_dn(ldb, res->msgs[0], "defaultNamingContext");
ldb_set_opaque(ldb, "default_baseDN", basedn);
}
+ talloc_free(res);
}
talloc_free(tmp_ctx);