summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-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);